Prefer actual constants to pseudo-constants in equivalence class machinery.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Oct 2012 18:19:34 +0000 (14:19 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Oct 2012 18:19:34 +0000 (14:19 -0400)
commit17804fa71b4a4e7a099f780616a7b53ea591774d
treecfce9d4014934bacc601a4d100a4eff646a94731
parent5a39114fe7d19280f6477ce1eb0d88beafda13a4
Prefer actual constants to pseudo-constants in equivalence class machinery.

generate_base_implied_equalities_const() should prefer plain Consts over
other em_is_const eclass members when choosing the "pivot" value that
all the other members will be equated to.  This makes it more likely that
the generated equalities will be useful in constraint-exclusion proofs.
Per report from Rushabh Lathia.
src/backend/optimizer/path/equivclass.c