Re: [PATCHES] extension for sql update

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: [PATCHES] extension for sql update
Дата
Msg-id
200607271311.k6RDBmH27064@momjian.us
Ответ на
Список
Дерево обсуждения
Re: [PATCHES] extension for sql update Susanne Ebrecht <miracee@miracee.de>
Re: [PATCHES] extension for sql update Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCHES] extension for sql update Susanne Ebrecht <miracee@miracee.de>
Re: [PATCHES] extension for sql update "Florian G. Pflug" <fgp@phlo.org>
Re: [PATCHES] extension for sql update Jim Nasby <jnasby@pervasive.com>
Re: [PATCHES] extension for sql update Bruce Momjian <bruce@momjian.us>
Tom Lane wrote:
> much anything that can generate a row.  The patch as you have it
> provides nothing more than syntactic sugar for something people can do
> anyway.  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);
> 
> and with something like that you can't break apart the row-valued
> expression in the grammar.  So in reality the feature has to propagate
> much further into the backend than this.

That UPDATE example is interesting because I remember when using
Informix that I had to do a separate SELECT statement for each UPDATE
column I wanted to update.  I didn't realize that you could group
columns and assign them from a single select --- clearly that is a
powerful syntax we should support some day.

-- 
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-hackers по дате отправления
От: Simon Riggs
Дата:
Сообщение: Re: Forcing wal rotation
От: Tom Lane
Дата:
FAQ