Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS
Date: 2017-06-30 21:07:27
Message-ID: oj6ei9$j5t$1@blaine.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter Eisentraut schrieb am 30.06.2017 um 23:03:
> On 6/26/17 15:22, zam6ak(at)gmail(dot)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?

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2017-06-30 21:14:36 Re: BUG #14724: Unable to revoke CREATE privileges on public schema
Previous Message Andres Freund 2017-06-30 21:06:29 Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS