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/backend/nodes/copyfuncs.c | |
parent | 4e08a625b006ba3992be881b516773adba5863e4 (diff) | |
download | postgresql-b3120804ad1692322a6d905b352df7fa0d7cdd80.tar.gz postgresql-b3120804ad1692322a6d905b352df7fa0d7cdd80.zip |
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/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 8417f7a716c..d9d5d13d8d4 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -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.179 2002/04/17 20:57:56 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.180 2002/04/18 20:01:09 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2380,14 +2380,15 @@ _copyCreateTrigStmt(CreateTrigStmt *from) return newnode; } -static DropTrigStmt * -_copyDropTrigStmt(DropTrigStmt *from) +static DropPropertyStmt * +_copyDropPropertyStmt(DropPropertyStmt *from) { - DropTrigStmt *newnode = makeNode(DropTrigStmt); + DropPropertyStmt *newnode = makeNode(DropPropertyStmt); - if (from->trigname) - newnode->trigname = pstrdup(from->trigname); Node_Copy(from, newnode, relation); + if (from->property) + newnode->property = pstrdup(from->property); + newnode->removeType = from->removeType; return newnode; } @@ -2915,8 +2916,8 @@ copyObject(void *from) case T_CreateTrigStmt: retval = _copyCreateTrigStmt(from); break; - case T_DropTrigStmt: - retval = _copyDropTrigStmt(from); + case T_DropPropertyStmt: + retval = _copyDropPropertyStmt(from); break; case T_CreatePLangStmt: retval = _copyCreatePLangStmt(from); |