Re: [PATCHES] extension for sql update

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCHES] extension for sql update
Дата
Msg-id 200607311726.11191.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: [PATCHES] extension for sql update  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] extension for sql update  (Rod Taylor <pg@rbt.ca>)
Re: [PATCHES] extension for sql update  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: tg_trigtuple not NULL in AFTER STATEMENT triggers?
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Connection limit and Superuser