122 foreach(
pl, parameters)
136 else if (
strcmp(
defel->defname,
"combinefunc") == 0)
138 else if (
strcmp(
defel->defname,
"serialfunc") == 0)
140 else if (
strcmp(
defel->defname,
"deserialfunc") == 0)
146 else if (
strcmp(
defel->defname,
"mfinalfunc") == 0)
148 else if (
strcmp(
defel->defname,
"finalfunc_extra") == 0)
150 else if (
strcmp(
defel->defname,
"mfinalfunc_extra") == 0)
152 else if (
strcmp(
defel->defname,
"finalfunc_modify") == 0)
154 else if (
strcmp(
defel->defname,
"mfinalfunc_modify") == 0)
160 else if (
strcmp(
defel->defname,
"hypothetical") == 0)
167 errmsg(
"only ordered-set aggregates can be hypothetical")));
192 errmsg(
"aggregate attribute \"%s\" not recognized",
202 errmsg(
"aggregate stype must be specified")));
206 errmsg(
"aggregate sfunc must be specified")));
218 errmsg(
"aggregate msfunc must be specified when mstype is specified")));
222 errmsg(
"aggregate minvfunc must be specified when mstype is specified")));
229 errmsg(
"aggregate msfunc must not be specified without mstype")));
233 errmsg(
"aggregate minvfunc must not be specified without mstype")));
237 errmsg(
"aggregate mfinalfunc must not be specified without mstype")));
241 errmsg(
"aggregate msspace must not be specified without mstype")));
245 errmsg(
"aggregate minitcond must not be specified without mstype")));
271 if (baseType ==
NULL)
274 errmsg(
"aggregate input type must be specified")));
301 if (baseType !=
NULL)
304 errmsg(
"basetype is redundant with aggregate input type specification")));
347 errmsg(
"aggregate transition data type cannot be %s",
359 errmsg(
"serialization functions may be specified only when the aggregate transition data type is %s",
369 errmsg(
"must specify both or neither of serialization and deserialization functions")));
388 errmsg(
"aggregate transition data type cannot be %s",
434 errmsg(
"parameter \"parallel\" must be SAFE, RESTRICTED, or UNSAFE")));
490 errmsg(
"parameter \"%s\" must be READ_ONLY, SHAREABLE, or READ_WRITE",
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
static char extractModify(DefElem *defel)
ObjectAddress DefineAggregate(ParseState *pstate, List *name, List *args, bool oldstyle, List *parameters, bool replace)
#define Assert(condition)
TypeName * defGetTypeName(DefElem *def)
int32 defGetInt32(DefElem *def)
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
List * defGetQualifiedName(DefElem *def)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
Datum OidInputFunctionCall(Oid functionId, char *str, Oid typioparam, int32 typmod)
void interpret_function_parameter_list(ParseState *pstate, List *parameters, Oid languageOid, ObjectType objtype, oidvector **parameterTypes, List **parameterTypes_list, ArrayType **allParameterTypes, ArrayType **parameterModes, ArrayType **parameterNames, List **inParameterNames_list, List **parameterDefaults, Oid *variadicArgType, Oid *requiredResultType)
void getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam)
char get_typtype(Oid typid)
char * get_namespace_name(Oid nspid)
Oid QualifiedNameGetCreationNamespace(const List *names, char **objname_p)
oidvector * buildoidvector(const Oid *oids, int n)
char * TypeNameToString(const TypeName *typeName)
Oid typenameTypeId(ParseState *pstate, const TypeName *typeName)
ObjectAddress AggregateCreate(const char *aggName, Oid aggNamespace, bool replace, char aggKind, int numArgs, int numDirectArgs, oidvector *parameterTypes, Datum allParameterTypes, Datum parameterModes, Datum parameterNames, List *parameterDefaults, Oid variadicArgType, List *aggtransfnName, List *aggfinalfnName, List *aggcombinefnName, List *aggserialfnName, List *aggdeserialfnName, List *aggmtransfnName, List *aggminvtransfnName, List *aggmfinalfnName, bool finalfnExtraArgs, bool mfinalfnExtraArgs, char finalfnModify, char mfinalfnModify, List *aggsortopName, Oid aggTransType, int32 aggTransSpace, Oid aggmTransType, int32 aggmTransSpace, const char *agginitval, const char *aggminitval, char proparallel)
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define linitial_node(type, l)
int pg_strcasecmp(const char *s1, const char *s2)
static Datum PointerGetDatum(const void *X)