mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Add a convenience routine makeFuncCall to reduce duplication.
David Fetter and Andrew Gierth, reviewed by Jeevan Chalke
This commit is contained in:
@ -508,3 +508,28 @@ makeDefElemExtended(char *nameSpace, char *name, Node *arg,
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* makeFuncCall -
|
||||
*
|
||||
* Initialize a FuncCall struct with the information every caller must
|
||||
* supply. Any non-default parameters have to be handled by the
|
||||
* caller.
|
||||
*
|
||||
*/
|
||||
|
||||
FuncCall *
|
||||
makeFuncCall(List *name, List *args, int location)
|
||||
{
|
||||
FuncCall *n = makeNode(FuncCall);
|
||||
n->funcname = name;
|
||||
n->args = args;
|
||||
n->location = location;
|
||||
n->agg_order = NIL;
|
||||
n->agg_star = FALSE;
|
||||
n->agg_distinct = FALSE;
|
||||
n->func_variadic = FALSE;
|
||||
n->over = NULL;
|
||||
return n;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user