Re: Support UPDATE table SET(*)=...
От | Merlin Moncure |
---|---|
Тема | Re: Support UPDATE table SET(*)=... |
Дата | |
Msg-id | CAHyXU0wicj-kpiO=Ytnha9Vb27j2Q9aH-ZuPLCa34jtfN1Ug+Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Support UPDATE table SET(*)=... (Marko Tiikkaja <marko@joh.to>) |
Ответы |
Re: Support UPDATE table SET(*)=...
Re: Support UPDATE table SET(*)=... |
Список | pgsql-hackers |
On Fri, Oct 17, 2014 at 9:55 AM, Marko Tiikkaja <marko@joh.to> wrote: > On 10/17/14 4:15 PM, Merlin Moncure wrote: >> >> Any particular reason why you couldn't have just done: >> >> UPDATE table1 SET * = a,b,c, ... > > > That just looks wrong to me. I'd prefer (*) = .. over that any day. > >> UPDATE table1 t SET t = (SELECT (a,b,c)::t FROM...); >> >> seems cleaner than the proposed syntax for row assignment. Tom >> objected though IIRC. > > I don't know about Tom, but I didn't like that: > http://www.postgresql.org/message-id/5364C982.7060003@joh.to Hm, I didn't understand your objection: <quoting> So e.g.: UPDATE foo f SET f = ..; would resolve to the table, despite there being a column called "f"? That would break backwards compatibility. </quoting> That's not correct: it should work exactly as 'select' does; given a conflict resolve the field name, so no backwards compatibility issue. merlin
В списке pgsql-hackers по дате отправления: