From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jan Wieck <JanWieck(at)Yahoo(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add Missing From? |
Date: | 2004-08-10 14:31:45 |
Message-ID: | 200408101431.i7AEVj410526@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have added the USING mention to the TODO list description for the
item.
* Allow DELETE to handle table aliases for self-joins [delete]
There is no way to specify a table alias for the deleted table in
the DELETE WHERE clause because there is no FROM clause. The agreed
approach is to allow a USING clause to specify additional tables
with aliases. UPDATE already has such an optional FROM clause.
---------------------------------------------------------------------------
=Tom Lane wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> > What about
> > DELETE FROM staff JOIN users ...
> > then?
>
> I don't much care for that, mainly because in my mind "x JOIN y" should
> always be semantically equivalent to "y JOIN x". I think we want a real
> clear syntactical separation between the deletion target table and the
> other tables.
>
> Also we do have the precedent of the way that UPDATE does things. We
> don't want to use the keyword FROM because of confusion, but I think
> we want to keep it basically the same as UPDATE.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-08-10 14:36:24 | Re: fsync vs open_sync (more info) |
Previous Message | Tom Lane | 2004-08-10 14:28:41 | Re: Add Missing From? |