Re: Support UPDATE table SET(*)=... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Support UPDATE table SET(*)=...
Date
Msg-id 11364.1413558971@sss.pgh.pa.us
Whole thread Raw
In response to Re: Support UPDATE table SET(*)=...  (Marko Tiikkaja <marko@joh.to>)
Responses Re: Support UPDATE table SET(*)=...
Re: Support UPDATE table SET(*)=...
List pgsql-hackers
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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Support UPDATE table SET(*)=...
Next
From: Merlin Moncure
Date:
Subject: Re: Support UPDATE table SET(*)=...