aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/sequence.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/sequence.c')
-rw-r--r--src/backend/commands/sequence.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 10ebe56b6a9..65712c2092c 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.132 2006/03/31 23:32:06 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.133 2006/07/02 02:23:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -180,7 +180,7 @@ DefineSequence(CreateSeqStmt *seq)
stmt->relation = seq->sequence;
stmt->inhRelations = NIL;
stmt->constraints = NIL;
- stmt->hasoids = MUST_NOT_HAVE_OIDS;
+ stmt->options = list_make1(defWithOids(false));
stmt->oncommit = ONCOMMIT_NOOP;
stmt->tablespacename = NULL;
@@ -205,7 +205,17 @@ DefineSequence(CreateSeqStmt *seq)
/* Now form & insert sequence tuple */
tuple = heap_formtuple(tupDesc, value, null);
- simple_heap_insert(rel, tuple);
+
+ {
+ /*
+ * HACK: Sequences insert only one tuple during initialize.
+ * We treat sequences as heaps then.
+ */
+ HeapOption opaque = { sizeof(HeapOption), 100 };
+ rel->rd_options = (bytea *) &opaque;
+ simple_heap_insert(rel, tuple);
+ rel->rd_options = NULL;
+ }
Assert(ItemPointerGetOffsetNumber(&(tuple->t_self)) == FirstOffsetNumber);