Prefer actual constants to pseudo-constants in equivalence class machinery.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 29d539b35fb9a5c82546918132f9a561c75f14d7
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2012-10-26T18:20:15Z
Releases: 8.3.22
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.

Files

PathChange+/−
src/backend/optimizer/path/equivclass.c modified +8 −2