Fix optimizer to not try to push WHERE clauses down into a sub-SELECT that

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

Commit: a1e17cd5c5807f905cb324399455eba32d43dd1e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2001-07-31T18:39:13Z
Releases: 7.1.3
Fix optimizer to not try to push WHERE clauses down into a sub-SELECT that
has a DISTINCT ON clause, per bug report from Anthony Wood.  While at it,
improve the DISTINCT-ON-clause recognizer routine to not be fooled by out-
of-order DISTINCT lists.
Also, back-patch earlier fix to not push down into sub-SELECT with LIMIT.

Files