OSDN Git Service

Oops, missed one fix for EquivalenceClass rearrangement.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Oct 2010 18:44:49 +0000 (14:44 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Oct 2010 18:44:49 +0000 (14:44 -0400)
commit48a1fb23900d73e7d9cb2dc0408c745cd03597a7
treea454932e37a27dbfd9b2c38d5fd7c3a41908fd5b
parent14231a41a94b2345cc679ff67dbee1bf7dac7029
Oops, missed one fix for EquivalenceClass rearrangement.

Now that we're expecting a mergeclause's left_ec/right_ec to persist from
the initial assignments, we can't just blithely zero these out when
transforming such a clause in adjust_appendrel_attrs.  But really it should
be okay to keep the parent's values, since a child table's derived Var
ought to be equivalent to the parent Var for all EquivalenceClass purposes.
(Indeed, I'm wondering whether we couldn't find a way to dispense with
add_child_rel_equivalences altogether.  But this is wrong in any case.)
src/backend/optimizer/prep/prepunion.c