aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/aggregatecmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-04-02 03:49:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-04-02 03:49:42 +0000
commit57690c6803525f879fe96920a05e979ece073e71 (patch)
tree42e82eaa1e9c8247b39a2ad783bf190b5001acfe /src/backend/commands/aggregatecmds.c
parenta482a3e58b3e5830899560c555e57e4184b8e6be (diff)
downloadpostgresql-57690c6803525f879fe96920a05e979ece073e71.tar.gz
postgresql-57690c6803525f879fe96920a05e979ece073e71.zip
Support enum data types. Along the way, use macros for the values of
pg_type.typtype whereever practical. Tom Dunstan, with some kibitzing from Tom Lane.
Diffstat (limited to 'src/backend/commands/aggregatecmds.c')
-rw-r--r--src/backend/commands/aggregatecmds.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c
index 27fc681bea3..89ea00d89a6 100644
--- a/src/backend/commands/aggregatecmds.c
+++ b/src/backend/commands/aggregatecmds.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/aggregatecmds.c,v 1.42 2007/01/05 22:19:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/aggregatecmds.c,v 1.43 2007/04/02 03:49:37 tgl Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -176,9 +176,8 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters)
* in some cases (AggregateCreate will check).
*/
transTypeId = typenameTypeId(NULL, transType);
- if (get_typtype(transTypeId) == 'p' &&
- transTypeId != ANYARRAYOID &&
- transTypeId != ANYELEMENTOID)
+ if (get_typtype(transTypeId) == TYPTYPE_PSEUDO &&
+ !IsPolymorphicType(transTypeId))
ereport(ERROR,
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
errmsg("aggregate transition data type cannot be %s",