Re: Support UPDATE table SET(*)=...
От | Merlin Moncure |
---|---|
Тема | Re: Support UPDATE table SET(*)=... |
Дата | |
Msg-id | CAHyXU0y92ukn0jSpD36TGChgzK8=1WhiFvBeXDNtjRV5oHVwPg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Support UPDATE table SET(*)=... (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Support UPDATE table SET(*)=...
|
Список | pgsql-hackers |
On Fri, Oct 17, 2014 at 10:16 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Marko Tiikkaja <marko@joh.to> writes: >> local:marko=#* create table foo(f int); >> CREATE TABLE >> local:marko=#* update foo f set f=1; >> UPDATE 0 > >> This query would change meaning with your suggestion. > > I think it wouldn't; Merlin is proposing that f would be taken as the > field name. A more realistic objection goes like this: > > create table foo(f int, g int); > update foo x set x = (1,2); -- works > alter table foo add column x int; > update foo x set x = (1,2,3); -- no longer works > > It's not a real good thing if a column addition or renaming can > so fundamentally change the nature of a query. That's exactly how SELECT works. I also dispute that the user should be surprised in such cases. merlin
В списке pgsql-hackers по дате отправления: