diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-07-30 17:57:25 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-07-30 17:57:25 +0000 |
commit | 1eef280d6186782b4adfbd6a9cb97413f7c46b8b (patch) | |
tree | 97a892a75b0e48038b3d59d4a24562b2d7cdfa1a /src/include/parser/parse_func.h | |
parent | 8e21bf52504616024618f3386dc68e8936405dc2 (diff) | |
download | postgresql-1eef280d6186782b4adfbd6a9cb97413f7c46b8b.tar.gz postgresql-1eef280d6186782b4adfbd6a9cb97413f7c46b8b.zip |
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.
Completion of back-port of my patch of yesterday.
Diffstat (limited to 'src/include/parser/parse_func.h')
-rw-r--r-- | src/include/parser/parse_func.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h index 5d203e60cae..f45e096e6db 100644 --- a/src/include/parser/parse_func.h +++ b/src/include/parser/parse_func.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/parser/parse_func.h,v 1.53 2004/12/31 22:03:38 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/parser/parse_func.h,v 1.53.4.1 2010/07/30 17:57:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -78,4 +78,6 @@ extern Oid LookupFuncName(List *funcname, int nargs, const Oid *argtypes, extern Oid LookupFuncNameTypeNames(List *funcname, List *argtypes, bool noError); +extern void check_pg_get_expr_args(ParseState *pstate, Oid fnoid, List *args); + #endif /* PARSE_FUNC_H */ |