mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user