@@ -2470,16 +2470,18 @@ RenameConstraint(RenameStmt *stmt)
2470
2470
}
2471
2471
2472
2472
/*
2473
- * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/FOREIGN TABLE RENAME
2473
+ * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/MATERIALIZED VIEW/FOREIGN TABLE
2474
+ * RENAME
2474
2475
*/
2475
2476
Oid
2476
2477
RenameRelation (RenameStmt * stmt )
2477
2478
{
2478
2479
Oid relid ;
2479
2480
2480
2481
/*
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.
2483
2485
*
2484
2486
* Lock level used here should match RenameRelationInternal, to avoid lock
2485
2487
* escalation.
@@ -2522,8 +2524,9 @@ RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal)
2522
2524
Oid namespaceId ;
2523
2525
2524
2526
/*
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.
2527
2530
*/
2528
2531
targetrelation = relation_open (myrelid , AccessExclusiveLock );
2529
2532
namespaceId = RelationGetNamespace (targetrelation );
0 commit comments