mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +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:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.161 2002/07/11 07:39:26 ishii Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.162 2002/07/12 18:43:17 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -582,6 +582,7 @@ ProcessUtility(Node *parsetree,
|
||||
stmt->indexParams, /* parameters */
|
||||
stmt->unique,
|
||||
stmt->primary,
|
||||
stmt->isconstraint,
|
||||
(Expr *) stmt->whereClause,
|
||||
stmt->rangetable);
|
||||
}
|
||||
@@ -596,19 +597,11 @@ ProcessUtility(Node *parsetree,
|
||||
break;
|
||||
|
||||
case T_RemoveAggrStmt:
|
||||
{
|
||||
RemoveAggrStmt *stmt = (RemoveAggrStmt *) parsetree;
|
||||
|
||||
RemoveAggregate(stmt->aggname, stmt->aggtype);
|
||||
}
|
||||
RemoveAggregate((RemoveAggrStmt *) parsetree);
|
||||
break;
|
||||
|
||||
case T_RemoveFuncStmt:
|
||||
{
|
||||
RemoveFuncStmt *stmt = (RemoveFuncStmt *) parsetree;
|
||||
|
||||
RemoveFunction(stmt->funcname, stmt->args);
|
||||
}
|
||||
RemoveFunction((RemoveFuncStmt *) parsetree);
|
||||
break;
|
||||
|
||||
case T_RemoveOperStmt:
|
||||
@@ -719,7 +712,7 @@ ProcessUtility(Node *parsetree,
|
||||
break;
|
||||
|
||||
case T_CreateTrigStmt:
|
||||
CreateTrigger((CreateTrigStmt *) parsetree);
|
||||
CreateTrigger((CreateTrigStmt *) parsetree, false);
|
||||
break;
|
||||
|
||||
case T_DropPropertyStmt:
|
||||
@@ -733,11 +726,13 @@ ProcessUtility(Node *parsetree,
|
||||
{
|
||||
case DROP_RULE:
|
||||
/* RemoveRewriteRule checks permissions */
|
||||
RemoveRewriteRule(relId, stmt->property);
|
||||
RemoveRewriteRule(relId, stmt->property,
|
||||
stmt->behavior);
|
||||
break;
|
||||
case DROP_TRIGGER:
|
||||
/* DropTrigger checks permissions */
|
||||
DropTrigger(relId, stmt->property);
|
||||
DropTrigger(relId, stmt->property,
|
||||
stmt->behavior);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user