@@ -2470,16 +2470,18 @@ RenameConstraint(RenameStmt *stmt)
24702470}
24712471
24722472/*
2473- * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/FOREIGN TABLE RENAME
2473+ * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/MATERIALIZED VIEW/FOREIGN TABLE
2474+ * RENAME
24742475 */
24752476Oid
24762477RenameRelation (RenameStmt * stmt )
24772478{
24782479 Oid relid ;
24792480
24802481 /*
2481- * Grab an exclusive lock on the target table, index, sequence or view,
2482- * which we will NOT release until end of transaction.
2482+ * Grab an exclusive lock on the target table, index, sequence, view,
2483+ * materialized view, or foreign table, which we will NOT release until
2484+ * end of transaction.
24832485 *
24842486 * Lock level used here should match RenameRelationInternal, to avoid lock
24852487 * escalation.
@@ -2522,8 +2524,9 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal)
25222524 Oid namespaceId ;
25232525
25242526 /*
2525- * Grab an exclusive lock on the target table, index, sequence or view,
2526- * which we will NOT release until end of transaction.
2527+ * Grab an exclusive lock on the target table, index, sequence, view,
2528+ * materialized view, or foreign table, which we will NOT release until
2529+ * end of transaction.
25272530 */
25282531 targetrelation = relation_open (myrelid , AccessExclusiveLock );
25292532 namespaceId = RelationGetNamespace (targetrelation );
0 commit comments