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

From Peter Eisentraut
Subject Re: [BUGS] BUG #14718: unable to update table with identity columnGENERATED ALWAYS
Date
Msg-id e8a2ecfd-220f-c0e0-8ea9-ff7938d9f9fe@2ndquadrant.com
Whole thread Raw
In response to [BUGS] BUG #14718: unable to update table with identity column GENERATEDALWAYS  (zam6ak@gmail.com)
List pgsql-bugs
On 6/26/17 15:22, zam6ak@gmail.com wrote:
> -- create tbl1
> create table tbl1 (
>   id   bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,    -- fails
>   --id   bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,  -- works
>   name text   NOT NULL               
> );
> -- add some  values
> insert into tbl1 (name) values ('Tommy');
> -- verify
> select * from tbl1; -- 1;"Tommy"
> 
> -- 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.

Fix committed.  Thanks for the report.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
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: Tom Lane
Date:
Subject: Re: [BUGS] Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS
Next
From: tianbing@highgo.com
Date:
Subject: [BUGS] BUG #14725: Partition constraint issue on multiple columns as the keyof range partition