}
/*
- * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/FOREIGN TABLE RENAME
+ * Execute ALTER TABLE/INDEX/SEQUENCE/VIEW/MATERIALIZED VIEW/FOREIGN TABLE
+ * RENAME
*/
Oid
RenameRelation(RenameStmt *stmt)
Oid relid;
/*
- * Grab an exclusive lock on the target table, index, sequence or view,
- * which we will NOT release until end of transaction.
+ * Grab an exclusive lock on the target table, index, sequence, view,
+ * materialized view, or foreign table, which we will NOT release until
+ * end of transaction.
*
* Lock level used here should match RenameRelationInternal, to avoid lock
* escalation.
Oid namespaceId;
/*
- * Grab an exclusive lock on the target table, index, sequence or view,
- * which we will NOT release until end of transaction.
+ * Grab an exclusive lock on the target table, index, sequence, view,
+ * materialized view, or foreign table, which we will NOT release until
+ * end of transaction.
*/
targetrelation = relation_open(myrelid, AccessExclusiveLock);
namespaceId = RelationGetNamespace(targetrelation);