Clean up bugs in clause_selectivity() cleanup.

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

Commit: eef8c0069e4d5eea2e52965ce3eb018b5a594fd6
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2017-04-08T20:38:03Z
Releases: 10.0
Clean up bugs in clause_selectivity() cleanup.

Commit ac2b09508 was not terribly carefully reviewed.  Band-aid it to
not fail on non-RestrictInfo input, per report from Andreas Seltenreich.
Also make it do something more reasonable with variable-free clauses,
and improve nearby comments.

Discussion: https://postgr.es/m/87inmf5rdx.fsf@credativ.de

Files

PathChange+/−
src/backend/optimizer/path/clausesel.c modified +42 −39

Discussion