On Fri, Mar 12, 2010 at 4:24 PM, Boszormenyi Zoltan <zb@cybertec.at> wrote:
> Merlin Moncure írta:
>> On Fri, Mar 12, 2010 at 3:01 PM, Boszormenyi Zoltan <zb@cybertec.at> wrote:
>>
>>> What's wrong with "UPDATE foo SET (foo) = (NEW);" ?
>>>
>>>
>>
>> amen brother! :-)
>>
>> I say though, since you can do:
>> SELECT foo FROM foo;
>> why not
>> UPDATE foo SET foo = new;?
>>
>
> I just tried this:
>
> zozo=# create table foo (foo integer, bar integer);
> CREATE TABLE
> zozo=# insert into foo values (1, 2), (2, 4);
> INSERT 0 2
> zozo=# select foo from foo;
> foo
> -----
> 1
> 2
> (2 rows)
But you can always get around this with, e.g.
SELECT v FROM foo v;
...Robert