Re: DELETE ... USING - Mailing list pgsql-patches

From Tom Lane
Subject Re: DELETE ... USING
Date
Msg-id 26339.1112629353@sss.pgh.pa.us
Whole thread Raw
In response to DELETE ... USING  (Neil Conway <neilc@samurai.com>)
Responses Re: DELETE ... USING  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> On a related note, UPDATE uses the FROM keyword to denote the list of
> relations to join with, whereas DELETE uses USING. Should we make USING
> an alias for FROM in UPDATE and if so, should we deprecate FROM? This
> would be more consistent, which I suppose is a good thing.

Of course, the entire reason this didn't happen years ago is that we
couldn't agree on what keyword to use... you sure you want to reopen
that discussion?

I don't think changing UPDATE is a good idea.  It's consistent with
SELECT and people are used to it.

You could argue that something like

    DELETE FROM target [ { USING | FROM } othertables ] ...

is the best compromise.  Those who like consistency can write FROM,
those who don't like "FROM a FROM b" can write something else.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: avg(int2) and avg(int8) micro-opt
Next
From: Tom Lane
Date:
Subject: Re: DELETE ... USING