Thread: pgsql: Fix ruleutils' get_variable() to print something useful for Vars

pgsql: Fix ruleutils' get_variable() to print something useful for Vars

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Fix ruleutils' get_variable() to print something useful for Vars referencing
resjunk outputs of subquery tlists, instead of throwing an error.  Per bug
#5548 from Daniel Grace.

We might at some point find we ought to back-patch this further than 9.0,
but I think that such Vars can only occur as resjunk members of upper-level
tlists, in which case the problem can't arise because prior versions didn't
print resjunk tlist items in EXPLAIN VERBOSE.

Tags:
----
REL9_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        ruleutils.c (r1.326 -> r1.326.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.326&r2=1.326.2.1)