From 3651a3e6fb41121f2262577774382e84bf9a3177 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 15 Apr 2006 17:45:46 +0000 Subject: 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. --- src/include/parser/parse_func.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/include/parser/parse_func.h') diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h index 13aa706a044..486e5ea44da 100644 --- a/src/include/parser/parse_func.h +++ b/src/include/parser/parse_func.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/parser/parse_func.h,v 1.55 2006/03/14 22:48:22 tgl Exp $ + * $PostgreSQL: pgsql/src/include/parser/parse_func.h,v 1.56 2006/04/15 17:45:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -72,11 +72,11 @@ extern const char *funcname_signature_string(const char *funcname, extern const char *func_signature_string(List *funcname, int nargs, const Oid *argtypes); -extern Oid find_aggregate_func(List *aggname, Oid basetype, bool noError); - extern Oid LookupFuncName(List *funcname, int nargs, const Oid *argtypes, bool noError); extern Oid LookupFuncNameTypeNames(List *funcname, List *argtypes, bool noError); +extern Oid LookupAggNameTypeNames(List *aggname, List *argtypes, + bool noError); #endif /* PARSE_FUNC_H */ -- cgit v1.2.3