aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/sequence.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-03-22 02:56:37 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-03-22 02:56:37 +0000
commit108a0ec87d41393c362c5b8d8aa17d9a734e4f1a (patch)
treef437cf9d8bb1db8fdacf1c1022eac0f11e146069 /src/backend/commands/sequence.c
parent56c9b73c1d426c79a604df6d6f36293dd9f18754 (diff)
downloadpostgresql-108a0ec87d41393c362c5b8d8aa17d9a734e4f1a.tar.gz
postgresql-108a0ec87d41393c362c5b8d8aa17d9a734e4f1a.zip
A little further progress on schemas: push down RangeVars into
addRangeTableEntry calls. Remove relname field from RTEs, since it will no longer be a useful unique identifier of relations; we want to encourage people to rely on the relation OID instead. Further work on dumping qual expressions in EXPLAIN, too.
Diffstat (limited to 'src/backend/commands/sequence.c')
-rw-r--r--src/backend/commands/sequence.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 5bcf4f82327..d0b1f7d4d58 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.73 2002/03/21 23:27:21 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.74 2002/03/22 02:56:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -87,6 +87,7 @@ DefineSequence(CreateSeqStmt *seq)
CreateStmt *stmt = makeNode(CreateStmt);
ColumnDef *coldef;
TypeName *typnam;
+ Oid seqoid;
Relation rel;
Buffer buf;
PageHeader page;
@@ -175,9 +176,9 @@ DefineSequence(CreateSeqStmt *seq)
stmt->constraints = NIL;
stmt->hasoids = false;
- DefineRelation(stmt, RELKIND_SEQUENCE);
+ seqoid = DefineRelation(stmt, RELKIND_SEQUENCE);
- rel = heap_openr(seq->sequence->relname, AccessExclusiveLock);
+ rel = heap_open(seqoid, AccessExclusiveLock);
tupDesc = RelationGetDescr(rel);
/* Initialize first page of relation with special magic number */