From 73677dd92f35b4c24b6c00b049aa9b0a66fdb702 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 18 Oct 2000 16:16:18 +0000 Subject: 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 --- src/include/nodes/parsenodes.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src/include/nodes/parsenodes.h') diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index b50990fe29..3913d88ce9 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.116 2000/10/07 00:58:21 tgl Exp $ + * $Id: parsenodes.h,v 1.117 2000/10/18 16:16:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -389,15 +389,24 @@ typedef struct DefineStmt List *definition; /* a list of DefElem */ } DefineStmt; + /* ---------------------- - * Drop Table Statement + * Drop Table|Sequence|View|Index|Rule|Type Statement * ---------------------- */ + +#define DROP_TABLE 1 +#define DROP_SEQUENCE 2 +#define DROP_VIEW 3 +#define DROP_INDEX 4 +#define DROP_RULE 5 +#define DROP_TYPE_P 6 + typedef struct DropStmt { NodeTag type; - List *relNames; /* relations to be dropped */ - bool sequence; + List *names; + int removeType; } DropStmt; /* ---------------------- @@ -527,17 +536,6 @@ typedef struct RemoveOperStmt List *args; /* types of the arguments */ } RemoveOperStmt; -/* ---------------------- - * Drop {Type|Index|Rule|View} Statement - * ---------------------- - */ -typedef struct RemoveStmt -{ - NodeTag type; - int removeType; /* P_TYPE|INDEX|RULE|VIEW */ - char *name; /* name to drop */ -} RemoveStmt; - /* ---------------------- * Alter Table Statement * ---------------------- -- cgit v1.2.1