Re: Why can't you define a table alias on an update?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, jim(at)nasby(dot)net, Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why can't you define a table alias on an update?
Date: 2003-06-24 01:54:41
Message-ID: 200306240154.h5O1sfY07290@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


TODO updated:

* Allow UPDATE, DELETE to handle table aliases for self-joins [delete]

---------------------------------------------------------------------------

Csaba Nagy wrote:
> Couldn't resist to not comment on this one:
>
> I find this feature would be extremely useful considering the fact that
> postgres supports the FROM clause in updates. This is already a useful
> extension to the SQL standard, so why not make it better ?
> I vote +1 to implement this !
>
> Cheers,
> Csaba.
>
> On Mon, 2003-06-16 at 15:42, Tom Lane wrote:
> > "Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> > > On Sun, Jun 15, 2003 at 06:36:57PM -0400, Tom Lane wrote:
> > >> It seems like a reasonable extension, but looking at the grammar just
> > >> now, I think that we'd have to turn SET from an unreserved keyword to a
> > >> reserved word to make this work. Not sure how many peoples' databases
> > >> that would break ... but we'd probably get a few complaints ...
> >
> > > Would it be reasonable to have a setting that enabled/disabled this?
> >
> > No, unless you want to have two complete bison parsers in there. AFAIK
> > there's no good way to alter the reserved-word status of a keyword on
> > the fly. So either we do it, or not.
> >
> > I'm not necessarily opposed to doing it, I just wanted to raise a flag
> > and see if anyone reading this thread would complain.
> >
> > regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
> >
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>

--
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-general by date

  From Date Subject
Next Message nolan 2003-06-24 02:31:01 Re: table alias on update, another update question
Previous Message Dan Langille 2003-06-24 01:46:49 Re: [GENERAL] interesting PHP/MySQL thread