When displaying a Var that is a reference to a column of an unnamed join,
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 27 Oct 2004 18:09:41 +0000 (18:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 27 Oct 2004 18:09:41 +0000 (18:09 +0000)
commitb2b0673e4be50915b92ec39de6ace4d2c5ba6a1d
treefa2b31cd42ff8b9d383b75c033832f42af0fee85
parent3fe704209adddf2835bb3e694267acddfc49bc9e
When displaying a Var that is a reference to a column of an unnamed join,
try to display it as a reference to the underlying column instead.  This
is a legitimate substitution (it wouldn't be for a named join) and it
fixes some cases where the display would otherwise be ambiguous.  Per
example from Sim Zacks.
src/backend/utils/adt/ruleutils.c
src/test/regress/expected/rules.out