From 0d22987ae9fe5dc9861e314f1609c8b69d61bbfc Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 1 Jul 2013 14:41:33 -0400 Subject: Add a convenience routine makeFuncCall to reduce duplication. David Fetter and Andrew Gierth, reviewed by Jeevan Chalke --- src/include/nodes/makefuncs.h | 2 ++ src/include/nodes/parsenodes.h | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'src/include/nodes') diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h index ee0c3657d6..3b71b5be40 100644 --- a/src/include/nodes/makefuncs.h +++ b/src/include/nodes/makefuncs.h @@ -75,6 +75,8 @@ extern TypeName *makeTypeNameFromOid(Oid typeOid, int32 typmod); extern FuncExpr *makeFuncExpr(Oid funcid, Oid rettype, List *args, Oid funccollid, Oid inputcollid, CoercionForm fformat); +extern FuncCall *makeFuncCall(List *name, List *args, int location); + extern DefElem *makeDefElem(char *name, Node *arg); extern DefElem *makeDefElemExtended(char *nameSpace, char *name, Node *arg, DefElemAction defaction); diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 9453e1dfdf..de22dff893 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -285,6 +285,11 @@ typedef struct CollateClause * construct *must* be an aggregate call. Otherwise, it might be either an * aggregate or some other kind of function. However, if OVER is present * it had better be an aggregate or window function. + * + * Normally, you'd initialize this via makeFuncCall() and then only + * change the parts of the struct its defaults don't match afterwards + * if needed. + * */ typedef struct FuncCall { -- cgit v1.2.3