Skip to content

Commit 0d22987

Browse files
committed
Add a convenience routine makeFuncCall to reduce duplication.
David Fetter and Andrew Gierth, reviewed by Jeevan Chalke
1 parent 3132a9b commit 0d22987

File tree

5 files changed

+96
-351
lines changed

5 files changed

+96
-351
lines changed

src/backend/nodes/makefuncs.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,3 +508,28 @@ makeDefElemExtended(char *nameSpace, char *name, Node *arg,
508508

509509
return res;
510510
}
511+
512+
/*
513+
* makeFuncCall -
514+
*
515+
* Initialize a FuncCall struct with the information every caller must
516+
* supply. Any non-default parameters have to be handled by the
517+
* caller.
518+
*
519+
*/
520+
521+
FuncCall *
522+
makeFuncCall(List *name, List *args, int location)
523+
{
524+
FuncCall *n = makeNode(FuncCall);
525+
n->funcname = name;
526+
n->args = args;
527+
n->location = location;
528+
n->agg_order = NIL;
529+
n->agg_star = FALSE;
530+
n->agg_distinct = FALSE;
531+
n->func_variadic = FALSE;
532+
n->over = NULL;
533+
return n;
534+
}
535+

0 commit comments

Comments
 (0)