aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 1205dbc0b5e..29d8353779b 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -10477,17 +10477,13 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock
list_free(index_oid_list);
}
- if (tuple_class->relkind == RELKIND_RELATION ||
- tuple_class->relkind == RELKIND_MATVIEW)
- {
- /* If it has a toast table, recurse to change its ownership */
- if (tuple_class->reltoastrelid != InvalidOid)
- ATExecChangeOwner(tuple_class->reltoastrelid, newOwnerId,
- true, lockmode);
+ /* If it has a toast table, recurse to change its ownership */
+ if (tuple_class->reltoastrelid != InvalidOid)
+ ATExecChangeOwner(tuple_class->reltoastrelid, newOwnerId,
+ true, lockmode);
- /* If it has dependent sequences, recurse to change them too */
- change_owner_recurse_to_sequences(relationOid, newOwnerId, lockmode);
- }
+ /* If it has dependent sequences, recurse to change them too */
+ change_owner_recurse_to_sequences(relationOid, newOwnerId, lockmode);
}
InvokeObjectPostAlterHook(RelationRelationId, relationOid, 0);