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

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Why can't you define a table alias on an update?
Date: 2003-06-16 06:06:13
Message-ID: 20030616060613.GC40542@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jun 15, 2003 at 06:36:57PM -0400, Tom Lane wrote:
> nolan(at)celery(dot)tssi(dot)com writes:
> > This is the query I posted a performance question on, but I have a
> > SQL standard question about it too:
> > Why can't you define an alias on the primary table in an update query?
>
> Because there's no such syntax in the SQL standard.
>
> 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?
Because I would **LOVE** to have aliases for UPDATE!
--
Jim C. Nasby (aka Decibel!) jim(at)nasby(dot)net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2003-06-16 06:12:33 Re: Index not being used in MAX function (7.2.3)
Previous Message Jim C. Nasby 2003-06-16 06:01:58 Re: Growing Database Size