diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-18 20:01:11 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-18 20:01:11 +0000 |
| commit | b3120804ad1692322a6d905b352df7fa0d7cdd80 (patch) | |
| tree | 93aaf632df82db20e63c952be8a6fd1e4ec15629 /src/include/nodes/parsenodes.h | |
| parent | 4e08a625b006ba3992be881b516773adba5863e4 (diff) | |
| download | postgresql-b3120804ad1692322a6d905b352df7fa0d7cdd80.tar.gz | |
Rule names are now unique per-relation, rather than unique globally.
DROP RULE and COMMENT ON RULE syntax adds an 'ON tablename' clause,
similar to TRIGGER syntaxes. To allow loading of existing pg_dump
files containing COMMENT ON RULE, the COMMENT code will still accept
the old syntax --- but only if the target rulename is unique across
the whole database.
Diffstat (limited to 'src/include/nodes/parsenodes.h')
| -rw-r--r-- | src/include/nodes/parsenodes.h | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index ba9ed9aa8d..dc2eabb5b2 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.171 2002/04/17 20:57:57 tgl Exp $ + * $Id: parsenodes.h,v 1.172 2002/04/18 20:01:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -940,13 +940,6 @@ typedef struct CreateTrigStmt RangeVar *constrrel; /* opposite relation */ } CreateTrigStmt; -typedef struct DropTrigStmt -{ - NodeTag type; - char *trigname; /* TRIGGER' name */ - RangeVar *relation; /* triggered relation */ -} DropTrigStmt; - /* ---------------------- * Create/Drop PROCEDURAL LANGUAGE Statement * ---------------------- @@ -1060,7 +1053,7 @@ typedef struct CreateDomainStmt } CreateDomainStmt; /* ---------------------- - * Drop Table|Sequence|View|Index|Rule|Type Statement + * Drop Table|Sequence|View|Index|Type|Domain Statement * ---------------------- */ @@ -1068,9 +1061,8 @@ typedef struct CreateDomainStmt #define DROP_SEQUENCE 2 #define DROP_VIEW 3 #define DROP_INDEX 4 -#define DROP_RULE 5 -#define DROP_TYPE 6 -#define DROP_DOMAIN 7 +#define DROP_TYPE 5 +#define DROP_DOMAIN 6 typedef struct DropStmt { @@ -1081,6 +1073,25 @@ typedef struct DropStmt } DropStmt; /* ---------------------- + * Drop Rule|Trigger Statement + * + * In general this may be used for dropping any property of a relation; + * for example, someday soon we may have DROP ATTRIBUTE. + * ---------------------- + */ + +#define DROP_RULE 100 +#define DROP_TRIGGER 101 + +typedef struct DropPropertyStmt +{ + NodeTag type; + RangeVar *relation; /* owning relation */ + char *property; /* name of rule, trigger, etc */ + int removeType; +} DropPropertyStmt; + +/* ---------------------- * Truncate Table Statement * ---------------------- */ |
