summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-07-29 23:16:41 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-07-29 23:16:41 +0000
commitc902ad9ca950fa1e6577ee3d13d96d4e78e84606 (patch)
treebdcdaffd324e21dba21d2c414d691cc2a71a03f3 /src/include
parenta0194371a8b037b6c9c189df73a420e0dfae6041 (diff)
Improved version of patch to protect pg_get_expr() against misuse:
look through join alias Vars to avoid breaking join queries, and move the test to someplace where it will catch more possible ways of calling a function. We still ought to throw away the whole thing in favor of a data-type-based solution, but that's not feasible in the back branches. This needs to be back-patched further than 9.0, but I don't have time to do so today. Committing now so that the fix gets into 9.0beta4.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/parser/parse_func.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h
index 3800f287598..0b68c0e0a10 100644
--- a/src/include/parser/parse_func.h
+++ b/src/include/parser/parse_func.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/parser/parse_func.h,v 1.68 2010/01/02 16:58:07 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/parser/parse_func.h,v 1.68.6.1 2010/07/29 23:16:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -82,4 +82,6 @@ extern Oid LookupFuncNameTypeNames(List *funcname, List *argtypes,
extern Oid LookupAggNameTypeNames(List *aggname, List *argtypes,
bool noError);
+extern void check_pg_get_expr_args(ParseState *pstate, Oid fnoid, List *args);
+
#endif /* PARSE_FUNC_H */