Restructure planning of nestloop inner indexscans so that the set of usable

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

Commit: 04c8785c7b2b3dea038522cd96085c710c628c5b
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2002-11-24T21:52:15Z
Releases: 7.4.1
Restructure planning of nestloop inner indexscans so that the set of usable
joinclauses is determined accurately for each join.  Formerly, the code only
considered joinclauses that used all of the rels from the outer side of the
join; thus for example
	FROM (a CROSS JOIN b) JOIN c ON (c.f1 = a.x AND c.f2 = b.y)
could not exploit a two-column index on c(f1,f2), since neither of the
qual clauses would be in the joininfo list it looked in.  The new code does
this correctly, and also is able to eliminate redundant clauses, thus fixing
the problem noted 24-Oct-02 by Hans-Jürgen Schönig.

Files