Re: WIP: patch to create explicit support for semi and anti joins - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: WIP: patch to create explicit support for semi and anti joins
Date
Msg-id 7ACAADB2-73EB-4047-B151-91CFA279E069@kineticode.com
Whole thread Raw
In response to WIP: patch to create explicit support for semi and anti joins  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: patch to create explicit support for semi and anti joins  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Aug 13, 2008, at 17:31, Tom Lane wrote:

> What's done:
>
> Introduce JOIN_SEMI and JOIN_ANTI join types, the former replacing
> JOIN_IN.  Unify the InClauseInfo and OuterJoinInfo infrastructure into
> "SpecialJoinInfo".  Convert IN, EXISTS, and NOT EXISTS clauses at top
> level of WHERE into semi and anti joins respectively.  Recognize
> LEFT JOIN with a suitable IS NULL filter condition as an anti join.
> This all compiles and passes the regression tests.

Wow. That sound awesome, Tom. Stupid question: Do these join types  
have some sort of correspondence to the SQL standard? Or would they be  
specific to PostgreSQL? Or is this just something that's under the  
hood an not actually a change to the syntax of SQL joins?

> What's not done:
>
> nodeMergejoin.c doesn't yet handle JOIN_ANTI.  (This is just a SMOP,
> but it's a lot more complicated than the nestloop or hash logic, and
> I figured nestloop and hash were enough for testing the planner.)

I guess that means you plan to do it once there has been significant  
testing with nestloop and hash and when the selectivity stuff is done?

Best,

David
(Who is in over his head, but decides to stick his toe in the water  
anyway.)


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: compilig libpq with borland 5.5
Next
From: Tom Lane
Date:
Subject: Re: WIP: patch to create explicit support for semi and anti joins