1
0
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:
Robert Haas
2013-07-01 14:41:33 -04:00
parent 3132a9b7ab
commit 0d22987ae9
5 changed files with 96 additions and 351 deletions

View File

@ -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;
}