Re: [PATCHES] extension for sql update

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Susanne Ebrecht <miracee(at)miracee(dot)de>
Subject: Re: [PATCHES] extension for sql update
Date: 2006-07-31 15:26:10
Message-ID: 200607311726.11191.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Am Mittwoch, 26. Juli 2006 22:58 schrieb Tom Lane:
> The reason people want this syntax is that they expect to be
> able to write, say,
>
> UPDATE mytab SET (foo, bar, baz) =
> (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key);

I don't find any derivation in the standard that would permit this. The only
thing I could find are variations on

SET (a) = x -- no parentheses
SET (a, b) = (x, y)
SET (a, b) = ROW (x, y)

where x and y are some sort of value expression. I would have expected the
sort of thing that you describe, but if you know how to derive that, I'd like
to see it.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-07-31 15:28:50 Re: Connection limit and Superuser
Previous Message Tom Lane 2006-07-31 15:12:14 Re: tg_trigtuple not NULL in AFTER STATEMENT triggers?

Browse pgsql-patches by date

  From Date Subject
Next Message Rod Taylor 2006-07-31 16:08:22 Re: [PATCHES] extension for sql update
Previous Message Katsuhiko Okano 2006-07-31 09:00:17 Re: LWLock statistics collector (was: CSStorm occurred again by postgreSQL8.2)