[SQL]allow to use aggregate
This commit is contained in:
@ -3795,12 +3795,12 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi
|
||||
|
||||
switch (stmt->kind) {
|
||||
case OBJECT_AGGREGATE:
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
if (!u_sess->attr.attr_common.IsInplaceUpgrade && !u_sess->exec_cxt.extension_is_valid)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("user defined aggregate is not yet supported.")));
|
||||
#endif /* PGXC */
|
||||
#endif /* ENABLE_MULTIPLE_NODES */
|
||||
DefineAggregate(stmt->defnames, stmt->args, stmt->oldstyle, stmt->definition);
|
||||
break;
|
||||
case OBJECT_OPERATOR:
|
||||
@ -8547,9 +8547,11 @@ void CheckObjectInBlackList(ObjectType obj_type, const char* query_string)
|
||||
return;
|
||||
else
|
||||
break;
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
case OBJECT_AGGREGATE:
|
||||
tag = "AGGREGATE";
|
||||
break;
|
||||
#endif
|
||||
case OBJECT_OPERATOR:
|
||||
tag = "OPERATOR";
|
||||
break;
|
||||
|
||||
@ -126,12 +126,12 @@ create aggregate newavg2 (sfunc = int4pl,
|
||||
stype = int4,
|
||||
finalfunc = int2um,
|
||||
initcond = '0');
|
||||
ERROR: user defined aggregate is not yet supported.
|
||||
ERROR: function int2um(smallint) requires run-time type coercion
|
||||
-- left out basetype
|
||||
create aggregate newcnt1 (sfunc = int4inc,
|
||||
stype = int4,
|
||||
initcond = '0');
|
||||
ERROR: user defined aggregate is not yet supported.
|
||||
ERROR: aggregate input type must be specified
|
||||
--
|
||||
-- DROP INDEX
|
||||
-- missing index name
|
||||
|
||||
@ -127,12 +127,12 @@ create aggregate newavg2 (sfunc = int4pl,
|
||||
stype = int4,
|
||||
finalfunc = int2um,
|
||||
initcond = '0');
|
||||
ERROR: user defined aggregate is not yet supported.
|
||||
ERROR: function int2um(smallint) requires run-time type coercion
|
||||
-- left out basetype
|
||||
create aggregate newcnt1 (sfunc = int4inc,
|
||||
stype = int4,
|
||||
initcond = '0');
|
||||
ERROR: user defined aggregate is not yet supported.
|
||||
ERROR: aggregate input type must be specified
|
||||
--
|
||||
-- DROP INDEX
|
||||
-- missing index name
|
||||
|
||||
Reference in New Issue
Block a user