diff options
Diffstat (limited to 'src/backend/commands/sequence.c')
-rw-r--r-- | src/backend/commands/sequence.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 5554e883d80..574b46a2812 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -217,7 +217,7 @@ DefineSequence(ParseState *pstate, CreateSeqStmt *seq) seqoid = address.objectId; Assert(seqoid != InvalidOid); - rel = heap_open(seqoid, AccessExclusiveLock); + rel = table_open(seqoid, AccessExclusiveLock); tupDesc = RelationGetDescr(rel); /* now initialize the sequence's data */ @@ -228,10 +228,10 @@ DefineSequence(ParseState *pstate, CreateSeqStmt *seq) if (owned_by) process_owned_by(rel, owned_by, seq->for_identity); - heap_close(rel, NoLock); + table_close(rel, NoLock); /* fill in pg_sequence */ - rel = heap_open(SequenceRelationId, RowExclusiveLock); + rel = table_open(SequenceRelationId, RowExclusiveLock); tupDesc = RelationGetDescr(rel); memset(pgs_nulls, 0, sizeof(pgs_nulls)); @@ -249,7 +249,7 @@ DefineSequence(ParseState *pstate, CreateSeqStmt *seq) CatalogTupleInsert(rel, tuple); heap_freetuple(tuple); - heap_close(rel, RowExclusiveLock); + table_close(rel, RowExclusiveLock); return address; } @@ -446,7 +446,7 @@ AlterSequence(ParseState *pstate, AlterSeqStmt *stmt) init_sequence(relid, &elm, &seqrel); - rel = heap_open(SequenceRelationId, RowExclusiveLock); + rel = table_open(SequenceRelationId, RowExclusiveLock); seqtuple = SearchSysCacheCopy1(SEQRELID, ObjectIdGetDatum(relid)); if (!HeapTupleIsValid(seqtuple)) @@ -506,7 +506,7 @@ AlterSequence(ParseState *pstate, AlterSeqStmt *stmt) ObjectAddressSet(address, RelationRelationId, relid); - heap_close(rel, RowExclusiveLock); + table_close(rel, RowExclusiveLock); relation_close(seqrel, NoLock); return address; @@ -518,7 +518,7 @@ DeleteSequenceTuple(Oid relid) Relation rel; HeapTuple tuple; - rel = heap_open(SequenceRelationId, RowExclusiveLock); + rel = table_open(SequenceRelationId, RowExclusiveLock); tuple = SearchSysCache1(SEQRELID, ObjectIdGetDatum(relid)); if (!HeapTupleIsValid(tuple)) @@ -527,7 +527,7 @@ DeleteSequenceTuple(Oid relid) CatalogTupleDelete(rel, &tuple->t_self); ReleaseSysCache(tuple); - heap_close(rel, RowExclusiveLock); + table_close(rel, RowExclusiveLock); } /* |