Improved version of patch to protect pg_get_expr() against misuse:
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 30 Jul 2010 17:57:12 +0000 (17:57 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 30 Jul 2010 17:57:12 +0000 (17:57 +0000)
commitbd707d3310f40495c7fb16456659f311dc154a5c
tree2a883b62a7585f136e53814de47759e83ec5a941
parenta0ad1d1f831d92e9bd94f6e821cc6c85804272e5
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.
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_oper.c
src/include/parser/parse_func.h