1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-03 09:13:20 +03:00
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.
This commit is contained in:
Marc G. Fournier
1997-05-22 00:17:24 +00:00
parent 021ccf0b8c
commit 5e7c0a0b9a
13 changed files with 202 additions and 49 deletions

View File

@@ -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 */

View File

@@ -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,

View File

@@ -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 $
*
*-------------------------------------------------------------------------
*/
@@ -271,6 +271,16 @@ typedef struct PurgeStmt {
char *afterDate; /* purge after this date */
} 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;

View File

@@ -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 */

View File

@@ -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 */