Re: Supporting multiple column assignment in UPDATE (9.5 project)

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Supporting multiple column assignment in UPDATE (9.5 project)
Date: 2014-05-05 15:33:25
Message-ID: CAHyXU0x8ubweyaXpL9XZ0K0dKgeAtFVj-99xyiyLnwHPB2AWfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 5, 2014 at 10:32 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
> On 05/05/2014 11:20 AM, Pavel Stehule wrote:
>>
>>
>>
>>
>> How about:
>> UPDATE foo SET (foo).* = (1,2,3);
>>
>>
>> It is looking little bit strange
>>
>> I like previous proposal UPDATE foo SET foo = (1,2,3);
>>
>
> What if the table has a field called foo? Won't it then be ambiguous?

See upthread: it prefers the field to the table if both are there
(exactly as SELECT does).

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G Johnston 2014-05-05 15:35:16 Re: Supporting multiple column assignment in UPDATE (9.5 project)
Previous Message Andrew Dunstan 2014-05-05 15:32:35 Re: Supporting multiple column assignment in UPDATE (9.5 project)