Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-04-04 15:47:06
Subject: Re: DELETE ... USING
Previous:From: WesDate: 2005-04-04 15:38:56
Subject: Re: Vacuum time degrading

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group