1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

Make OIDs optional, per discussions in pghackers. WITH OIDS is still the

default, but OIDS are removed from many system catalogs that don't need them.
Some interesting side effects: TOAST pointers are 20 bytes not 32 now;
pg_description has a three-column key instead of one.

Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey
has some usefulness; pg_dump dumps comments on indexes, rules, and
triggers in a valid order.

initdb forced.
This commit is contained in:
Tom Lane
2001-08-10 18:57:42 +00:00
parent d062f0f4e9
commit bf56f0759b
83 changed files with 1962 additions and 1583 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.151 2001/08/10 14:30:14 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.152 2001/08/10 18:57:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1967,11 +1967,12 @@ _copyCreateStmt(CreateStmt *from)
{
CreateStmt *newnode = makeNode(CreateStmt);
newnode->istemp = from->istemp;
newnode->relname = pstrdup(from->relname);
Node_Copy(from, newnode, tableElts);
Node_Copy(from, newnode, inhRelnames);
Node_Copy(from, newnode, constraints);
newnode->istemp = from->istemp;
newnode->hasoids = from->hasoids;
return newnode;
}

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.99 2001/08/10 14:30:14 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.100 2001/08/10 18:57:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -819,8 +819,6 @@ _equalCopyStmt(CopyStmt *a, CopyStmt *b)
static bool
_equalCreateStmt(CreateStmt *a, CreateStmt *b)
{
if (a->istemp != b->istemp)
return false;
if (!equalstr(a->relname, b->relname))
return false;
if (!equal(a->tableElts, b->tableElts))
@@ -829,6 +827,10 @@ _equalCreateStmt(CreateStmt *a, CreateStmt *b)
return false;
if (!equal(a->constraints, b->constraints))
return false;
if (a->istemp != b->istemp)
return false;
if (a->hasoids != b->hasoids)
return false;
return true;
}

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.142 2001/06/19 22:39:11 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.143 2001/08/10 18:57:36 tgl Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -108,9 +108,6 @@ _outCreateStmt(StringInfo str, CreateStmt *node)
appendStringInfo(str, " CREATE :relname ");
_outToken(str, node->relname);
appendStringInfo(str, " :istemp %s ",
booltostr(node->istemp));
appendStringInfo(str, " :columns ");
_outNode(str, node->tableElts);
@@ -119,6 +116,10 @@ _outCreateStmt(StringInfo str, CreateStmt *node)
appendStringInfo(str, " :constraints ");
_outNode(str, node->constraints);
appendStringInfo(str, " :istemp %s :hasoids %s ",
booltostr(node->istemp),
booltostr(node->hasoids));
}
static void