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

Re: DELETE ... USING

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>,eulerto(at)yahoo(dot)com(dot)br, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DELETE ... USING
Date: 2005-04-05 01:18:05
Message-ID: 4251E74D.3030507@samurai.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
[ CC'ing hackers to see if anyone else wants to weigh in ]

Tom Lane wrote:
> 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?

Sure, it doesn't seem too difficult to settle to me.

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

Fair enough, I can't get too excited about it either.

> 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.

This would be fine with me. Are there any other opinions out there on 
what syntax would be best for this feature? (For those on -hackers, the 
feature in question is adding the ability to specify additional tables 
to "join" against in a DELETE, as can be done using FROM in UPDATE.)

-Neil

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-04-05 02:06:12
Subject: Re: [HACKERS] plPHP in core?
Previous:From: Neil ConwayDate: 2005-04-05 01:07:58
Subject: Re: DELETE ... USING

pgsql-patches by date

Next:From: Tom LaneDate: 2005-04-05 02:04:06
Subject: Re: avg(int2) and avg(int8) micro-opt
Previous:From: Neil ConwayDate: 2005-04-05 01:07:58
Subject: Re: DELETE ... USING

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