From: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Why the "UPDATE tab SET tab.col" is invalid? |
Date: | 2016-04-07 16:41:28 |
Message-ID: | CAEzk6feA3rzwCNKA+u3jneqfW_kAMhBd4Hhb92we=BeC_-WQwQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 7 April 2016 at 16:45, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Don't know which version of the SQL spec you're looking at,
It was the draft 95 version, cos (being text file) it's easiest to
read :). I'll learn my lesson next time and expand the 2008 one.
> but SQL:2008 has
>
> <update statement: searched> ::=
> UPDATE <target table> [ [ AS ] <correlation name> ]
> SET <set clause list>
> [ WHERE <search condition> ]
[snip]
> The reason why SQL doesn't allow an optional correlation name, and
> probably never will, is the same as the reason why we don't, and probably
> never will: it introduces an ambiguity as to whether you meant a dotted
> set-clause target name to be a reference to a field of a composite column
> or just a noise-word reference to the table's correlation name.
I stand (comprehensively :) ) corrected, thanks for clarifying.
Geoff
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2016-04-07 17:17:19 | Re: Using quicksort for every external sort run |
Previous Message | Alvaro Herrera | 2016-04-07 16:37:55 | Re: [CommitFest App] Feature request -- review e-mail additions |