Re: [PATCHES] extension for sql update
От
Bruce Momjian
Тема
Re: [PATCHES] extension for sql update
Дата
Msg-id
200607271328.k6RDS5519882@momjian.us
Ответ на
Re: [PATCHES] extension for sql update (Tom Lane)
Список
Дерево обсуждения
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: > Bruce Momjian writes: > > Tom Lane wrote: > >> UPDATE mytab SET (foo, bar, baz) = > >> (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key); > > > 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. > > No question. The decision at hand is whether we want to look like > we support it, when we don't yet. I'd vote not, because I think the > main use-case for the row-on-the-left syntax is exactly this, and > so I fear people will just get frustrated if they see it in the > syntax synopsis and try to use it. Agreed. My guess is that a soluion that allows SELECT to return multiple values is going to be in another area of the code, and will require us to remove this code once that is done. -- Bruce Momjian bruce@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-hackers по дате отправления
От: Joshua Reich
Дата: