pgsql: Prefer actual constants to pseudo-constants in equivalence class

Started by Tom Laneover 13 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7e765cb0688a9280a89f5054d3cb57fe892d73f5

Modified Files
--------------
src/backend/optimizer/path/equivclass.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)