1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Replace uses of heap_open et al with the corresponding table_* function.

Author: Andres Freund
Discussion: https://postgr.es/m/20190111000539.xbv7s6w7ilcvm7dp@alap3.anarazel.de
This commit is contained in:
Andres Freund
2019-01-21 10:32:19 -08:00
parent 111944c5ee
commit e0c4ec0728
114 changed files with 1259 additions and 1259 deletions

View File

@ -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);
}
/*