aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/typecmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-07-01 15:27:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-07-01 15:27:56 +0000
commit131f801d37b77d3633c07142010d1968c09e3fd8 (patch)
tree236b50e70f0ceb7bbc203c6c95c8b825069cb56d /src/backend/commands/typecmds.c
parenta3ec44a5d3206a50782ac0b4c7990cf1cdaf0092 (diff)
downloadpostgresql-131f801d37b77d3633c07142010d1968c09e3fd8.tar.gz
postgresql-131f801d37b77d3633c07142010d1968c09e3fd8.zip
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.
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r--src/backend/commands/typecmds.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index 6aa5fae182e..a9b46855810 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.3 2002/05/03 00:32:16 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.4 2002/07/01 15:27:48 tgl Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -39,7 +39,6 @@
#include "commands/comment.h"
#include "commands/defrem.h"
#include "miscadmin.h"
-#include "parser/parse.h"
#include "parser/parse_func.h"
#include "parser/parse_type.h"
#include "utils/acl.h"
@@ -268,7 +267,7 @@ DefineType(List *names, List *parameters)
* only work on scalar types.
*/
void
-RemoveType(List *names)
+RemoveType(List *names, DropBehavior behavior)
{
TypeName *typename;
Relation relation;
@@ -574,7 +573,7 @@ DefineDomain(CreateDomainStmt *stmt)
* Removes a domain.
*/
void
-RemoveDomain(List *names, int behavior)
+RemoveDomain(List *names, DropBehavior behavior)
{
TypeName *typename;
Relation relation;
@@ -583,7 +582,7 @@ RemoveDomain(List *names, int behavior)
char typtype;
/* CASCADE unsupported */
- if (behavior == CASCADE)
+ if (behavior == DROP_CASCADE)
elog(ERROR, "DROP DOMAIN does not support the CASCADE keyword");
/* Make a TypeName so we can use standard type lookup machinery */