summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-10-18 16:16:18 +0000
committerBruce Momjian <bruce@momjian.us>2000-10-18 16:16:18 +0000
commit73677dd92f35b4c24b6c00b049aa9b0a66fdb702 (patch)
tree83001516af1867e74807bfb40392d8adbf869f46 /src/backend/parser
parent60dcf13ea10a5ab6fa61e8509df36b5823a15857 (diff)
The following patch was sent to the patches list:
This patch forces the use of 'DROP VIEW' to destroy views. It also changes the syntax of DROP VIEW to DROP VIEW v1, v2, ... to match the syntax of DROP TABLE. Some error messages were changed so this patch also includes changes to the appropriate expected/*.out files. Doc changes for 'DROP TABLE" and 'DROP VIEW' are included. -- Mark Hollomon
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index a596bd6aba1..fbda2758035 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.195 2000/10/07 00:58:17 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.196 2000/10/18 16:16:05 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -1942,15 +1942,22 @@ def_arg: func_return { $$ = (Node *)$1; }
DropStmt: DROP TABLE relation_name_list
{
DropStmt *n = makeNode(DropStmt);
- n->relNames = $3;
- n->sequence = FALSE;
+ n->names = $3;
+ n->removeType = DROP_TABLE;
$$ = (Node *)n;
}
| DROP SEQUENCE relation_name_list
{
DropStmt *n = makeNode(DropStmt);
- n->relNames = $3;
- n->sequence = TRUE;
+ n->names = $3;
+ n->removeType = DROP_SEQUENCE;
+ $$ = (Node *)n;
+ }
+ | DROP VIEW relation_name_list
+ {
+ DropStmt *n = makeNode(DropStmt);
+ n->names = $3;
+ n->removeType = DROP_VIEW;
$$ = (Node *)n;
}
;
@@ -2558,17 +2565,16 @@ func_return: Typename
RemoveStmt: DROP remove_type name
{
- RemoveStmt *n = makeNode(RemoveStmt);
+ DropStmt *n = makeNode(DropStmt);
n->removeType = $2;
- n->name = $3;
+ n->names = makeList1(makeString($3));
$$ = (Node *)n;
}
;
-remove_type: TYPE_P { $$ = TYPE_P; }
- | INDEX { $$ = INDEX; }
- | RULE { $$ = RULE; }
- | VIEW { $$ = VIEW; }
+remove_type: TYPE_P { $$ = DROP_TYPE_P; }
+ | INDEX { $$ = DROP_INDEX; }
+ | RULE { $$ = DROP_RULE; }
;