Re: DELETE ... USING

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, eulerto(at)yahoo(dot)com(dot)br
Subject: Re: DELETE ... USING
Date: 2005-04-04 15:42:33
Message-ID: 26339.1112629353@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Neil Conway <neilc(at)samurai(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-04-04 15:47:06 Re: DELETE ... USING
Previous Message Wes 2005-04-04 15:38:56 Re: Vacuum time degrading

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-04-04 15:47:06 Re: DELETE ... USING
Previous Message Tom Lane 2005-04-04 15:21:50 Re: avg(int2) and avg(int8) micro-opt