Re: DELETE syntax on JOINS - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: DELETE syntax on JOINS
Date
Msg-id 200908241602.n7OG2mw20105@momjian.us
Whole thread Raw
In response to Re: DELETE syntax on JOINS  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: DELETE syntax on JOINS  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: DELETE syntax on JOINS  (Bill Moran <wmoran@potentialtech.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> 
> > > Ultimately, why not allow:
> > > 
> > > DELETE h, tn
> > > FROM history AS h 
> > > INNER JOIN term_node AS tn ON (h.nid = tn.nid) 
> > > INNER JOIN term_data AS td ON (td.tid = tn.tid) 
> > > WHERE h.uid = 2067 AND td.vid = 2
> > > 
> > > IMHO this would improve compliance towards other database systems. To me
> > > this seems to be in the reasonable scope of compatibility.
> > 
> > Which "other database systems"?  Only MySQL?  If it is MySQL-only, we
> > are unlikely to add it.
> 
> The SQL standard does not support this syntax.  They would have you put
> the joins in a subselect (which is often not enough because then you
> can't use outer joins).

So the problem is that our DELETE ... USING does not allow ANSI join
syntax?  Can that be added?


--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: SIGUSR1 pingpong between master na autovacum launcher causes crash
Next
From: David Fetter
Date:
Subject: Bug in date arithmetic