Re: Optimization rules for semi and anti joins - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Optimization rules for semi and anti joins
Date
Msg-id 831948C5-D718-429D-9A64-204EEA6EE575@enterprisedb.com
Whole thread Raw
In response to Re: Optimization rules for semi and anti joins  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 11 Feb 2009, at 00:03, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Actually, that makes less sense than the antijoin case.  For antijoin
> there is a well-defined value for the extended columns, ie null.  For
> a semijoin the RHS values might come from any of the rows that happen
> to join to the current LHS row, so I'm just as happy that it's
> syntactically impossible to reference them.

Actually I think the way mysql users used to spell EXISTS/IN before  
mysql supported them would qualify as a semijoin where you can access  
the columns:

SELECT distinct a.* from a,b WHERE a.id = b.id

To access columns from b in postgres you would have to use DISTINCT ON. 


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS
Next
From: Matteo Beccati
Date:
Subject: Re: DISCARD ALL failing to acquire locks on pg_listen