Re: [SQL] "SELECT IN" Still Broken in 7.4b - Mailing list pgsql-hackers

From Manfred Koizar
Subject Re: [SQL] "SELECT IN" Still Broken in 7.4b
Date
Msg-id p0dakv05anhoqgmmgipbmpk9dhsdcm73pe@4ax.com
Whole thread Raw
In response to Re: [SQL] "SELECT IN" Still Broken in 7.4b  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [SQL] "SELECT IN" Still Broken in 7.4b
List pgsql-hackers
On Thu, 21 Aug 2003 16:42:20 -0400, Tom Lane <tgl@sss.pgh.pa.us>
wrote:
>The point is that given
>    WHERE a = 1 OR b = 1
>you could create a plan that first indexscans on a, then indexscans on
>b --- but you mustn't return any tuples in the second scan that you
>already returned in the first.  IndexNext solves this by evaluating the
>prior-scan index conditions to see if they are true.
WHERE a = 1 OR b = 2
andWHERE a = 1 OR a = 2

are totally different things.  In the latter case you don't have to
check prior conditions because the conditions are mutually exclusive.
Is this reasonably easy to find out at plan creation time?

Yes, I changed your example to make my point clear, becauseWHERE a = 1 OR a = 1
has its own set of problems.

ServusManfred


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: [SQL] "SELECT IN" Still Broken in 7.4b
Next
From: Josh Berkus
Date:
Subject: Re: [SQL] "SELECT IN" Still Broken in 7.4b