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

Add more dependency insertions --- this completes the basic pg_depend

functionality.  Of note: dropping a table that has a SERIAL column
defined now drops the associated sequence automatically.
This commit is contained in:
Tom Lane
2002-07-16 22:12:20 +00:00
parent cdebcad6af
commit 5af19e4227
19 changed files with 402 additions and 90 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.193 2002/07/12 18:43:16 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.194 2002/07/16 22:12:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1749,6 +1749,7 @@ _copyColumnDef(ColumnDef *from)
if (from->cooked_default)
newnode->cooked_default = pstrdup(from->cooked_default);
Node_Copy(from, newnode, constraints);
Node_Copy(from, newnode, support);
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.140 2002/07/12 18:43:16 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.141 2002/07/16 22:12:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1636,6 +1636,8 @@ _equalColumnDef(ColumnDef *a, ColumnDef *b)
return false;
if (!equal(a->constraints, b->constraints))
return false;
if (!equal(a->support, b->support))
return false;
return true;
}

View File

@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.162 2002/07/12 18:43:16 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.163 2002/07/16 22:12:19 tgl Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -183,6 +183,8 @@ _outColumnDef(StringInfo str, ColumnDef *node)
_outToken(str, node->cooked_default);
appendStringInfo(str, " :constraints ");
_outNode(str, node->constraints);
appendStringInfo(str, " :support ");
_outNode(str, node->support);
}
static void