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

Re: Allow an alias for the target table in UPDATE/DELETE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Atsushi Ogawa <atsushi(dot)ogawa(at)gmail(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Allow an alias for the target table in UPDATE/DELETE
Date: 2006-01-22 05:48:06
Message-ID: 4602.1137908886@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Neil Conway <neilc(at)samurai(dot)com> writes:
> From looking at SQL2003, it seems to me that this syntax is actually
> specified by the standard:

> <update statement: searched> ::=
>     UPDATE <target table> [ [ AS ] <correlation name> ]
>     SET <set clause list>
>     [ WHERE <search condition> ]

> <delete statement: searched> ::=
>     DELETE FROM <target table> [ [ AS ] <correlation name> ]
>     [ WHERE <search condition> ]

Interesting, because the AS clause is most definitely *not* in
SQL92 or SQL99.

I'm all for this change, in any case, but it's interesting to notice
that the SQL committee actually does respond to the masses ...

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Neil ConwayDate: 2006-01-22 05:53:09
Subject: Re: TupleDesc refcounting
Previous:From: Neil ConwayDate: 2006-01-22 05:29:37
Subject: Re: Allow an alias for the target table in UPDATE/DELETE

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