Re: WIP: patch to create explicit support for semi and anti joins

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: WIP: patch to create explicit support for semi and anti joins
Date: 2008-08-14 02:52:53
Message-ID: 7ACAADB2-73EB-4047-B151-91CFA279E069@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-14 03:12:00 Re: WIP: patch to create explicit support for semi and anti joins
Previous Message Bruce Momjian 2008-08-14 02:46:41 Re: compilig libpq with borland 5.5