mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
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.
This commit is contained in:
@@ -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.139 2002/07/01 15:27:52 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.140 2002/07/12 18:43:16 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -912,6 +912,8 @@ _equalIndexStmt(IndexStmt *a, IndexStmt *b)
|
||||
return false;
|
||||
if (a->primary != b->primary)
|
||||
return false;
|
||||
if (a->isconstraint != b->isconstraint)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1734,14 +1736,18 @@ _equalFkConstraint(FkConstraint *a, FkConstraint *b)
|
||||
return false;
|
||||
if (!equal(a->pk_attrs, b->pk_attrs))
|
||||
return false;
|
||||
if (!equalstr(a->match_type, b->match_type))
|
||||
if (a->fk_matchtype != b->fk_matchtype)
|
||||
return false;
|
||||
if (a->actions != b->actions)
|
||||
if (a->fk_upd_action != b->fk_upd_action)
|
||||
return false;
|
||||
if (a->fk_del_action != b->fk_del_action)
|
||||
return false;
|
||||
if (a->deferrable != b->deferrable)
|
||||
return false;
|
||||
if (a->initdeferred != b->initdeferred)
|
||||
return false;
|
||||
if (a->skip_validation != b->skip_validation)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user