diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-07-12 18:43:19 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-07-12 18:43:19 +0000 |
| commit | 7c6df91dda27accab3097390ef0d21d93028c7a1 (patch) | |
| tree | 5705b975e8de4edf82252e6df28e0bd57c83cb95 /src/backend/nodes/outfuncs.c | |
| parent | 791a40f943e2a9353c5823fb4f2bd446ec623d38 (diff) | |
| download | postgresql-7c6df91dda27accab3097390ef0d21d93028c7a1.tar.gz | |
Second phase of committing Rod Taylor's pg_depend/pg_constraint patch.
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY
constraints all have real live entries in pg_constraint. pg_depend
exists, and RESTRICT/CASCADE options work on most kinds of DROP;
however, pg_depend is not yet very well populated with dependencies.
(Most of the ones that are present at this point just replace formerly
hardwired associations, such as the implicit drop of a relation's pg_type
entry when the relation is dropped.) Need to add more logic to create
dependency entries, improve pg_dump to dump constraints in place of
indexes and triggers, and add some regression tests.
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
| -rw-r--r-- | src/backend/nodes/outfuncs.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 2b29263518..ae3139a6ea 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -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.161 2002/07/04 15:23:53 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.162 2002/07/12 18:43:16 tgl Exp $ * * NOTES * Every (plan) node in POSTGRES has an associated "out" routine which @@ -136,9 +136,10 @@ _outIndexStmt(StringInfo str, IndexStmt *node) _outNode(str, node->whereClause); appendStringInfo(str, " :rangetable "); _outNode(str, node->rangetable); - appendStringInfo(str, " :unique %s :primary %s ", + appendStringInfo(str, " :unique %s :primary %s :isconstraint %s ", booltostr(node->unique), - booltostr(node->primary)); + booltostr(node->primary), + booltostr(node->isconstraint)); } static void @@ -1447,12 +1448,13 @@ _outFkConstraint(StringInfo str, FkConstraint *node) _outNode(str, node->fk_attrs); appendStringInfo(str, " :pk_attrs "); _outNode(str, node->pk_attrs); - appendStringInfo(str, " :match_type "); - _outToken(str, node->match_type); - appendStringInfo(str, " :actions %d :deferrable %s :initdeferred %s", - node->actions, + appendStringInfo(str, " :fk_matchtype %c :fk_upd_action %c :fk_del_action %c :deferrable %s :initdeferred %s :skip_validation %s", + node->fk_matchtype, + node->fk_upd_action, + node->fk_del_action, booltostr(node->deferrable), - booltostr(node->initdeferred)); + booltostr(node->initdeferred), + booltostr(node->skip_validation)); } static void |
