summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMarc G. Fournier1997-05-22 00:17:24 +0000
committerMarc G. Fournier1997-05-22 00:17:24 +0000
commit5e7c0a0b9ac226add5029afe0af67409438294bc (patch)
tree3377f3307a5aef00fc2c246070dd984256f6b117 /src/include
parent021ccf0b8cde8ba2e522f0b3e0ba9c030a136cd6 (diff)
From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] DROP AGGREGATE patch/fix. Here's a patch that fixes the DROP AGGREGATE command to delete the desired aggregate for a specific type.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/commands/defrem.h4
-rw-r--r--src/include/nodes/nodes.h3
-rw-r--r--src/include/nodes/parsenodes.h16
-rw-r--r--src/include/parser/catalog_utils.h3
-rw-r--r--src/include/utils/acl.h4
5 files changed, 22 insertions, 8 deletions
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h
index 4d582910015..f47e7a343ea 100644
--- a/src/include/commands/defrem.h
+++ b/src/include/commands/defrem.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: defrem.h,v 1.6 1996/11/13 20:51:18 scrappy Exp $
+ * $Id: defrem.h,v 1.7 1997/05/22 00:15:47 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,6 +48,6 @@ extern void RemoveFunction(char *functionName, int nargs, List *argNameList);
extern void RemoveOperator(char *operatorName,
char *typeName1, char *typeName2);
extern void RemoveType(char *typeName);
-extern void RemoveAggregate(char *aggName);
+extern void RemoveAggregate(char *aggName, char *aggType);
#endif /* DEFREM_H */
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index e63e56f251d..16d50d3b701 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.8 1997/04/23 03:17:29 scrappy Exp $
+ * $Id: nodes.h,v 1.9 1997/05/22 00:15:58 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -164,6 +164,7 @@ typedef enum NodeTag {
T_ProcedureStmt,
T_PurgeStmt,
T_RecipeStmt,
+ T_RemoveAggrStmt,
T_RemoveFuncStmt,
T_RemoveOperStmt,
T_RemoveStmt,
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index d29e66bcf53..288434c785b 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.15 1997/04/29 04:28:59 vadim Exp $
+ * $Id: parsenodes.h,v 1.16 1997/05/22 00:16:13 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -272,6 +272,16 @@ typedef struct PurgeStmt {
} PurgeStmt;
/* ----------------------
+ * Drop Aggregate Statement
+ * ----------------------
+ */
+typedef struct RemoveAggrStmt {
+ NodeTag type;
+ char *aggname; /* aggregate to drop */
+ char *aggtype; /* for this type */
+} RemoveAggrStmt;
+
+/* ----------------------
* Drop Function Statement
* ----------------------
*/
@@ -292,12 +302,12 @@ typedef struct RemoveOperStmt {
} RemoveOperStmt;
/* ----------------------
- * Drop {Aggregate|Type|Index|Rule|View} Statement
+ * Drop {Type|Index|Rule|View} Statement
* ----------------------
*/
typedef struct RemoveStmt {
NodeTag type;
- int removeType; /* AGGREGATE|P_TYPE|INDEX|RULE|VIEW */
+ int removeType; /* P_TYPE|INDEX|RULE|VIEW */
char *name; /* name to drop */
} RemoveStmt;
diff --git a/src/include/parser/catalog_utils.h b/src/include/parser/catalog_utils.h
index 98b03fe41aa..4be3c7edec9 100644
--- a/src/include/parser/catalog_utils.h
+++ b/src/include/parser/catalog_utils.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: catalog_utils.h,v 1.8 1997/02/07 16:24:12 momjian Exp $
+ * $Id: catalog_utils.h,v 1.9 1997/05/22 00:16:28 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,5 +53,6 @@ extern Oid get_typelem(Oid type_id);
extern char FindDelimiter(char *typename);
extern void op_error(char *op, Oid arg1, Oid arg2);
extern void func_error(char *caller, char *funcname, int nargs, Oid *argtypes);
+extern void agg_error(char *caller, char *aggname, Oid basetypeID);
#endif /* CATALOG_UTILS_H */
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index bc4473d37d7..6aa5b72b7f0 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: acl.h,v 1.5 1997/03/12 20:48:48 scrappy Exp $
+ * $Id: acl.h,v 1.6 1997/05/22 00:16:41 scrappy Exp $
*
* NOTES
* For backward-compatability purposes we have to allow there
@@ -161,6 +161,8 @@ extern int32 pg_aclcheck(char *relname, char *usename, AclMode mode);
extern int32 pg_ownercheck(char *usename, char *value, int cacheid);
extern int32 pg_func_ownercheck(char *usename, char *funcname,
int nargs, Oid *arglist);
+extern int32 pg_aggr_ownercheck(char *usename, char *aggname,
+ Oid basetypeID);
#endif /* ACL_H */