*** ./src/backend/parser/parse_expr.c.orig 2009-04-20 14:03:09.000000000 +0200 --- ./src/backend/parser/parse_expr.c 2009-04-20 14:18:14.000000000 +0200 *************** *** 36,41 **** --- 36,44 ---- bool Transform_null_equals = false; + /* Hook for plugins to get control in transformFuncCall */ + ParseExprFuncCallTransform_hook_type ParseExprFuncCallTransform_hook = NULL; + static Node *transformParamRef(ParseState *pstate, ParamRef *pref); static Node *transformAExprOp(ParseState *pstate, A_Expr *a); static Node *transformAExprAnd(ParseState *pstate, A_Expr *a); *************** *** 1091,1096 **** --- 1094,1108 ---- static Node * transformFuncCall(ParseState *pstate, FuncCall *fn) { + if (ParseExprFuncCallTransform_hook) + return (*ParseExprFuncCallTransform_hook) (pstate, fn); + else + return standard_transformFuncCall(pstate, fn); + } + + Node * + standard_transformFuncCall(ParseState *pstate, FuncCall *fn) + { List *targs; ListCell *args; *** ./src/include/parser/parse_expr.h.orig 2009-04-20 14:09:24.000000000 +0200 --- ./src/include/parser/parse_expr.h 2009-04-20 14:17:50.000000000 +0200 *************** *** 20,23 **** --- 20,28 ---- extern Node *transformExpr(ParseState *pstate, Node *expr); + /* hook for parse plugin to get control in transformFuncCall */ + typedef Node *(*ParseExprFuncCallTransform_hook_type) (ParseState *pstate, FuncCall *expr); + extern PGDLLIMPORT ParseExprFuncCallTransform_hook_type ParseExprFuncCallTransform_hook; + extern Node *standard_transformFuncCall(ParseState *pstate, FuncCall *fn); + #endif /* PARSE_EXPR_H */