mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
First phase of applying Rod Taylor's pg_depend patch. This just adds
RESTRICT/CASCADE syntax to the DROP commands that need it, and propagates the behavioral option through the parser to the routines that execute drops. Doesn't do anything useful yet, but I figured I'd commit these changes so I could get out of the parser area while working on the rest.
This commit is contained in:
@@ -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.191 2002/06/20 20:29:29 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.192 2002/07/01 15:27:51 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2115,6 +2115,7 @@ _copyRemoveAggrStmt(RemoveAggrStmt *from)
|
||||
|
||||
Node_Copy(from, newnode, aggname);
|
||||
Node_Copy(from, newnode, aggtype);
|
||||
newnode->behavior = from->behavior;
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@@ -2126,6 +2127,7 @@ _copyRemoveFuncStmt(RemoveFuncStmt *from)
|
||||
|
||||
Node_Copy(from, newnode, funcname);
|
||||
Node_Copy(from, newnode, args);
|
||||
newnode->behavior = from->behavior;
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@@ -2137,6 +2139,7 @@ _copyRemoveOperStmt(RemoveOperStmt *from)
|
||||
|
||||
Node_Copy(from, newnode, opname);
|
||||
Node_Copy(from, newnode, args);
|
||||
newnode->behavior = from->behavior;
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@@ -2395,6 +2398,7 @@ _copyDropPropertyStmt(DropPropertyStmt *from)
|
||||
if (from->property)
|
||||
newnode->property = pstrdup(from->property);
|
||||
newnode->removeType = from->removeType;
|
||||
newnode->behavior = from->behavior;
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@@ -2422,6 +2426,7 @@ _copyDropPLangStmt(DropPLangStmt *from)
|
||||
|
||||
if (from->plname)
|
||||
newnode->plname = pstrdup(from->plname);
|
||||
newnode->behavior = from->behavior;
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
@@ -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.138 2002/06/20 20:29:29 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.139 2002/07/01 15:27:52 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -942,6 +942,8 @@ _equalRemoveAggrStmt(RemoveAggrStmt *a, RemoveAggrStmt *b)
|
||||
return false;
|
||||
if (!equal(a->aggtype, b->aggtype))
|
||||
return false;
|
||||
if (a->behavior != b->behavior)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -953,6 +955,8 @@ _equalRemoveFuncStmt(RemoveFuncStmt *a, RemoveFuncStmt *b)
|
||||
return false;
|
||||
if (!equal(a->args, b->args))
|
||||
return false;
|
||||
if (a->behavior != b->behavior)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -964,6 +968,8 @@ _equalRemoveOperStmt(RemoveOperStmt *a, RemoveOperStmt *b)
|
||||
return false;
|
||||
if (!equal(a->args, b->args))
|
||||
return false;
|
||||
if (a->behavior != b->behavior)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1229,6 +1235,8 @@ _equalDropPropertyStmt(DropPropertyStmt *a, DropPropertyStmt *b)
|
||||
return false;
|
||||
if (a->removeType != b->removeType)
|
||||
return false;
|
||||
if (a->behavior != b->behavior)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1255,6 +1263,8 @@ _equalDropPLangStmt(DropPLangStmt *a, DropPLangStmt *b)
|
||||
{
|
||||
if (!equalstr(a->plname, b->plname))
|
||||
return false;
|
||||
if (a->behavior != b->behavior)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user