mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Aggregates can be polymorphic, using polymorphic implementation functions.
It also works to create a non-polymorphic aggregate from polymorphic functions, should you want to do that. Regression test added, docs still lacking. By Joe Conway, with some kibitzing from Tom Lane.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/aggregatecmds.c,v 1.8 2003/06/27 14:45:27 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/aggregatecmds.c,v 1.9 2003/07/01 19:10:52 tgl Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@ -120,7 +120,9 @@ DefineAggregate(List *names, List *parameters)
|
||||
baseTypeId = typenameTypeId(baseType);
|
||||
|
||||
transTypeId = typenameTypeId(transType);
|
||||
if (get_typtype(transTypeId) == 'p')
|
||||
if (get_typtype(transTypeId) == 'p' &&
|
||||
transTypeId != ANYARRAYOID &&
|
||||
transTypeId != ANYELEMENTOID)
|
||||
elog(ERROR, "Aggregate transition datatype cannot be %s",
|
||||
format_type_be(transTypeId));
|
||||
|
||||
|
Reference in New Issue
Block a user