Permalink
Browse files

Add a convenience routine makeFuncCall to reduce duplication.

David Fetter and Andrew Gierth, reviewed by Jeevan Chalke
  • Loading branch information...
1 parent 3132a9b commit 0d22987ae9fe5dc9861e314f1609c8b69d61bbfc Robert Haas committed Jul 1, 2013
@@ -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;
+}
+
Oops, something went wrong.

0 comments on commit 0d22987

Please sign in to comment.