diff options
author | Robert Haas <rhaas@postgresql.org> | 2013-07-01 14:41:33 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2013-07-01 14:46:54 -0400 |
commit | 0d22987ae9fe5dc9861e314f1609c8b69d61bbfc (patch) | |
tree | f99ba262c356a7fd3c8af83847ea53a056a6f714 /src/backend/nodes/makefuncs.c | |
parent | 3132a9b7ab3d76c15f88cfa29792fd888e7a959e (diff) | |
download | postgresql-0d22987ae9fe5dc9861e314f1609c8b69d61bbfc.tar.gz postgresql-0d22987ae9fe5dc9861e314f1609c8b69d61bbfc.zip |
Add a convenience routine makeFuncCall to reduce duplication.
David Fetter and Andrew Gierth, reviewed by Jeevan Chalke
Diffstat (limited to 'src/backend/nodes/makefuncs.c')
-rw-r--r-- | src/backend/nodes/makefuncs.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/backend/nodes/makefuncs.c b/src/backend/nodes/makefuncs.c index c487db96d81..245aef226a5 100644 --- a/src/backend/nodes/makefuncs.c +++ b/src/backend/nodes/makefuncs.c @@ -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; +} + |