CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: tgl@postgresql.org 03/01/23 22:58:44
Modified files:
src/backend/nodes: list.c
src/backend/optimizer/path: indxpath.c pathkeys.c
src/backend/optimizer/plan: initsplan.c
src/backend/optimizer/util: joininfo.c relnode.c restrictinfo.c
src/backend/utils/adt: selfuncs.c
src/include/nodes: pg_list.h
src/include/optimizer: joininfo.h paths.h planmain.h
Log message:
Modify planner's implied-equality-deduction code so that when a set
of known-equal expressions includes any constant expressions (including
Params from outer queries), we actively suppress any 'var = var'
clauses that are or could be deduced from the set, generating only the
deducible 'var = const' clauses instead. The idea here is to push down
the restrictions implied by the equality set to base relations whenever
possible. Once we have applied the 'var = const' clauses, the 'var = var'
clauses are redundant, and should be suppressed both to save work at
execution and to avoid double-counting restrictivity.