summaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-07-12 18:43:19 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-07-12 18:43:19 +0000
commit7c6df91dda27accab3097390ef0d21d93028c7a1 (patch)
tree5705b975e8de4edf82252e6df28e0bd57c83cb95 /src/backend/nodes/copyfuncs.c
parent791a40f943e2a9353c5823fb4f2bd446ec623d38 (diff)
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/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 739161b1791..4e568a3c531 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -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.192 2002/07/01 15:27:51 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.193 2002/07/12 18:43:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1505,11 +1505,12 @@ _copyFkConstraint(FkConstraint *from)
Node_Copy(from, newnode, pktable);
Node_Copy(from, newnode, fk_attrs);
Node_Copy(from, newnode, pk_attrs);
- if (from->match_type)
- newnode->match_type = pstrdup(from->match_type);
- newnode->actions = from->actions;
+ newnode->fk_matchtype = from->fk_matchtype;
+ newnode->fk_upd_action = from->fk_upd_action;
+ newnode->fk_del_action = from->fk_del_action;
newnode->deferrable = from->deferrable;
newnode->initdeferred = from->initdeferred;
+ newnode->skip_validation = from->skip_validation;
return newnode;
}
@@ -2089,6 +2090,7 @@ _copyIndexStmt(IndexStmt *from)
Node_Copy(from, newnode, rangetable);
newnode->unique = from->unique;
newnode->primary = from->primary;
+ newnode->isconstraint = from->isconstraint;
return newnode;
}