From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Kevin Brown <kevin(at)sysexperts(dot)com> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: request for sql3 compliance for the update command |
Date: | 2003-02-21 18:00:53 |
Message-ID: | Pine.LNX.4.33.0302211057260.17876-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 20 Feb 2003, Kevin Brown wrote:
> Tom Lane wrote:
> > UPDATE totals SET
> > xmax = ss.xmax, xmin = ss.xmin, ...
> > FROM
> > (SELECT groupid, max(x) AS xmax, ... FROM details GROUP BY groupid) ss
> > WHERE groupid = ss.groupid;
>
> As long as any individual item that you can express in the
> parenthesized (Informix) syntax can also be expressed as an element in
> a SELECT, then the above is equivalent in every way to the Informix
> syntax. And since SELECT allows subselects, it seems to me that the
> PG syntax is complete.
>
> My question is whether or not there's likely to be an approved
> standard way of accomplishing what either syntax does. Is there
> anything in the current draft that addresses this?
Yes there is. I've posted the URL on the hackers list a while back, but
here it is again:
ftp://sqlstandards.org/SC32/WG3/Progression_Documents/FCD/4FCD1-02-Foundation-2002-01.pdf
pp 851 to 862, in particular, p 858 defines the the <set clause list> as
supporting <multiple column assignment> as supporting something like:
(target1, target2, target3) = (value1, value2, value3)
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2003-02-21 18:12:20 | fixups for 7.3 to contrib directories |
Previous Message | Tom Lane | 2003-02-21 15:27:29 | Re: Loss of cluster status |