Skip site navigation (1) Skip section navigation (2)

pgsql: Fix thinko in new match_join_clauses_to_index() logic.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix thinko in new match_join_clauses_to_index() logic.
Date: 2012-02-28 23:10:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Fix thinko in new match_join_clauses_to_index() logic.

We don't need to constrain the other side of an indexable join clause to
not be below an outer join; an example here is

SELECT FROM t1 LEFT JOIN t2 ON t1.a = t2.b LEFT JOIN t3 ON t2.c = t3.d;

We can consider an inner indexscan on t3.d using c = d as indexqual, even
though t2.c is potentially nulled by a previous outer join.  The comparable
logic in orindxpath.c has always worked that way, but I was being overly
cautious here.



Modified Files
src/backend/optimizer/path/indxpath.c |    8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-02-29 00:54:08
Subject: pgsql: Move CRC tables to libpgport,and provide them in a separate inc
Previous:From: Peter EisentrautDate: 2012-02-28 10:44:10
Subject: pgsql: Add const qualifiers where they are accidentally cast away

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group