1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

Sequences are now based on int8, not int4, arithmetic. SERIAL pseudo-type

has an alias SERIAL4 and a sister SERIAL8.  SERIAL8 is just the same
except the created column is type int8 not int4.
initdb forced.  Note this also breaks any chance of pg_upgrade from 7.1,
unless we hack up pg_upgrade to drop and recreate sequences.  (Which is
not out of the question, but I don't wanna do it.)
This commit is contained in:
Tom Lane
2001-08-16 20:38:56 +00:00
parent bcb0ccf5be
commit d4f4b971a4
21 changed files with 254 additions and 182 deletions

View File

@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.152 2001/08/10 18:57:36 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.153 2001/08/16 20:38:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1708,7 +1708,6 @@ _copyColumnDef(ColumnDef *from)
newnode->colname = pstrdup(from->colname);
Node_Copy(from, newnode, typename);
newnode->is_not_null = from->is_not_null;
newnode->is_sequence = from->is_sequence;
Node_Copy(from, newnode, raw_default);
if (from->cooked_default)
newnode->cooked_default = pstrdup(from->cooked_default);

View File

@@ -20,7 +20,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.100 2001/08/10 18:57:36 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.101 2001/08/16 20:38:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1543,8 +1543,6 @@ _equalColumnDef(ColumnDef *a, ColumnDef *b)
return false;
if (a->is_not_null != b->is_not_null)
return false;
if (a->is_sequence != b->is_sequence)
return false;
if (!equal(a->raw_default, b->raw_default))
return false;
if (!equalstr(a->cooked_default, b->cooked_default))

View File

@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.143 2001/08/10 18:57:36 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.144 2001/08/16 20:38:53 tgl Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -175,9 +175,8 @@ _outColumnDef(StringInfo str, ColumnDef *node)
_outToken(str, node->colname);
appendStringInfo(str, " :typename ");
_outNode(str, node->typename);
appendStringInfo(str, " :is_not_null %s :is_sequence %s :raw_default ",
booltostr(node->is_not_null),
booltostr(node->is_sequence));
appendStringInfo(str, " :is_not_null %s :raw_default ",
booltostr(node->is_not_null));
_outNode(str, node->raw_default);
appendStringInfo(str, " :cooked_default ");
_outToken(str, node->cooked_default);