summaryrefslogtreecommitdiff
path: root/src/backend/commands/aggregatecmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/aggregatecmds.c')
-rw-r--r--src/backend/commands/aggregatecmds.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c
index 6b9f86ea0e..89201c2c1d 100644
--- a/src/backend/commands/aggregatecmds.c
+++ b/src/backend/commands/aggregatecmds.c
@@ -59,8 +59,6 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters)
char *initval = NULL;
#ifdef PGXC
List *collectfuncName = NIL;
- TypeName *collectType = NULL;
- Oid collectTypeId;
char *initcollect = NULL;
#endif
Oid *aggArgTypes;
@@ -106,8 +104,6 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters)
#ifdef PGXC
else if (pg_strcasecmp(defel->defname, "cfunc") == 0)
collectfuncName = defGetQualifiedName(defel);
- else if (pg_strcasecmp(defel->defname, "ctype") == 0)
- collectType = defGetTypeName(defel);
else if (pg_strcasecmp(defel->defname, "initcollect") == 0)
initcollect = defGetString(defel);
#endif
@@ -130,21 +126,6 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters)
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
errmsg("aggregate sfunc must be specified")));
-#ifdef PGXC
- if (collectType == NULL)
- ereport(ERROR,
- (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
- errmsg("aggregate ctype must be specified")));
- if (collectfuncName == NIL)
- ereport(ERROR,
- (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
- errmsg("aggregate cfunc must be specified")));
- if (collectType != transType)
- ereport(ERROR,
- (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
- errmsg("aggregate ctype should be same as aggregate stype")));
-
-#endif
/*
* look up the aggregate's input datatype(s).
*/
@@ -221,21 +202,6 @@ DefineAggregate(List *name, List *args, bool oldstyle, List *parameters)
format_type_be(transTypeId))));
}
-#ifdef PGXC
- collectTypeId = typenameTypeId(NULL, collectType, NULL);
- if (get_typtype(collectTypeId) == TYPTYPE_PSEUDO &&
- !IsPolymorphicType(collectTypeId))
- {
- if (collectTypeId == INTERNALOID && superuser())
- /* okay */ ;
- else
- ereport(ERROR,
- (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
- errmsg("aggregate transition data type cannot be %s",
- format_type_be(collectTypeId))));
- }
-
-#endif
/*
* Most of the argument-checking is done inside of AggregateCreate
*/