Re: Add Missing From?

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 17:09:09
Message-ID: 200408101709.i7AH99b09457@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> This description confuses two quite separate issues.
>
> > Yea, it does.
>
> > How is this text:
>
> > * Allow DELETE to handle table aliases for self-joins
>
> > There is no way to create a table alias for the deleted table for use
> > in the DELETE WHERE clause. The agreed approach is to allow a USING
> > clause to specify additional tables. UPDATE already has an optional
> > FROM clause for this purpose.
>
> Not a lot better. They really should be two separate issues, because we
> could in theory do either without the other.
>
> * Allow an alias to be provided for the target table in UPDATE/DELETE
>
> This is not SQL-spec but many DBMSs allow it.

I don't think we would ever do the above item. I see no purpose to
allowing the UPDATE/DELETE table to have an alias as long as you can
create another reference to the table that does have an alias. In fact,
having a alias for the deleted item seems too prone to confusion.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-10 17:16:58 Re: Add Missing From?
Previous Message Tom Lane 2004-08-10 17:01:42 Re: Add Missing From?