summaryrefslogtreecommitdiff
path: root/src/include/commands
diff options
context:
space:
mode:
authorTom Lane2006-04-15 17:45:46 +0000
committerTom Lane2006-04-15 17:45:46 +0000
commit3651a3e6fb41121f2262577774382e84bf9a3177 (patch)
treee09fb8fcf6851e4625f4eb5595ede6f16367056f /src/include/commands
parentebd5257d493ac8a6f20eea667409cf9b06ac3202 (diff)
Support the syntax
CREATE AGGREGATE aggname (input_type) (parameter_list) along with the old syntax where the input type was named in the parameter list. This fits more naturally with the way that the aggregate is identified in DROP AGGREGATE and other utility commands; furthermore it has a natural extension to handle multiple-input aggregates, where the basetype-parameter method would get ugly. In fact, this commit fixes the grammar and all the utility commands to support multiple-input aggregates; but DefineAggregate rejects it because the executor isn't fixed yet. I didn't do anything about treating agg(*) as a zero-input aggregate instead of artificially making it a one-input aggregate, but that should be considered in combination with supporting multi-input aggregates.
Diffstat (limited to 'src/include/commands')
-rw-r--r--src/include/commands/defrem.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h
index 99e061d2def..f6ed06f3dbf 100644
--- a/src/include/commands/defrem.h
+++ b/src/include/commands/defrem.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.71 2006/03/05 15:58:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.72 2006/04/15 17:45:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,22 +57,23 @@ extern void AlterFunction(AlterFunctionStmt *stmt);
extern void CreateCast(CreateCastStmt *stmt);
extern void DropCast(DropCastStmt *stmt);
extern void DropCastById(Oid castOid);
-extern void AlterFunctionNamespace(List *name, List *argtypes,
+extern void AlterFunctionNamespace(List *name, List *argtypes, bool isagg,
const char *newschema);
/* commands/operatorcmds.c */
extern void DefineOperator(List *names, List *parameters);
-extern void RemoveOperator(RemoveOperStmt *stmt);
+extern void RemoveOperator(RemoveFuncStmt *stmt);
extern void RemoveOperatorById(Oid operOid);
extern void AlterOperatorOwner(List *name, TypeName *typeName1,
TypeName *typename2, Oid newOwnerId);
extern void AlterOperatorOwner_oid(Oid operOid, Oid newOwnerId);
/* commands/aggregatecmds.c */
-extern void DefineAggregate(List *names, List *parameters);
-extern void RemoveAggregate(RemoveAggrStmt *stmt);
-extern void RenameAggregate(List *name, TypeName *basetype, const char *newname);
-extern void AlterAggregateOwner(List *name, TypeName *basetype, Oid newOwnerId);
+extern void DefineAggregate(List *name, List *args, bool oldstyle,
+ List *parameters);
+extern void RemoveAggregate(RemoveFuncStmt *stmt);
+extern void RenameAggregate(List *name, List *args, const char *newname);
+extern void AlterAggregateOwner(List *name, List *args, Oid newOwnerId);
/* commands/opclasscmds.c */
extern void DefineOpClass(CreateOpClassStmt *stmt);