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

From Tom Lane
Subject Re: DELETE syntax on JOINS
Date
Msg-id 14512.1251132624@sss.pgh.pa.us
Whole thread Raw
In response to Re: DELETE syntax on JOINS  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: DELETE syntax on JOINS  (Robert Haas <robertmhaas@gmail.com>)
Re: DELETE syntax on JOINS  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Bruce Momjian wrote:
>> So the problem is that our DELETE ... USING does not allow ANSI join
>> syntax?  Can that be added?

> Not sure about that.  USING is already an extension to the standard, so
> if we extend it a bit more, it can't be a problem, can it?

I don't see any very good way to extend the USING syntax to allow the
target table to be outer-joined to something else.  Some other systems
allow it by letting you re-specify the target in the other clause,
equivalently to

DELETE FROM target t USING t LEFT JOIN other_table ot ON ...

but we have always considered that the target is *not* to be identified
with any member of the FROM/USING clause, so it would be a serious
compatibility break to change that now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug in date arithmetic
Next
From: Sam Mason
Date:
Subject: Re: Bug in date arithmetic