[BUGS] Re: BUG #14718: unable to update table with identity column GENERATEDALWAYS - Mailing list pgsql-bugs

From Thomas Kellerer
Subject [BUGS] Re: BUG #14718: unable to update table with identity column GENERATEDALWAYS
Date
Msg-id oj6ei9$j5t$1@blaine.gmane.org
Whole thread Raw
In response to Re: [BUGS] BUG #14718: unable to update table with identity columnGENERATED ALWAYS  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [BUGS] Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Peter Eisentraut schrieb am 30.06.2017 um 23:03:
> On 6/26/17 15:22, zam6ak@gmail.com wrote:
>> -- now try to update
>> update tbl1 set name = 'Bobby' where id = 1;
>>
>> ERROR:  column "id" can only be updated to DEFAULT
>> DETAIL:  Column "id" is an identity column defined as GENERATED ALWAYS.
> 
> This is working as expected.  What is the problem?

I'd say the problem is, that the id column is NOT updated in that statement, only the name.

The identity column is only included in the WHERE clause - it's not changed at all.
Surely that is not the way it's meant to be?




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: [BUGS] BUG #14718: unable to update table with identity columnGENERATED ALWAYS
Next
From: "David G. Johnston"
Date:
Subject: Re: [BUGS] BUG #14724: Unable to revoke CREATE privileges on public schema