Adjust subquery qual pushdown rules to be more forgiving: if a qual

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

Commit: 05f916e6add9726bf4ee046e4060c1b03c9961f2
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2003-03-22T01:49:38Z
Releases: 7.4.1
Adjust subquery qual pushdown rules to be more forgiving: if a qual
refers to a non-DISTINCT output column of a DISTINCT ON subquery, or
if it refers to a function-returning-set, we cannot push it down.
But the old implementation refused to push down *any* quals if the
subquery had any such 'dangerous' outputs.  Now we just look at the
output columns actually referenced by each qual expression.  More code
than before, but probably no slower since we don't make unnecessary checks.

Files