From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | zam6ak(at)gmail(dot)com, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS |
Date: | 2017-07-01 04:08:02 |
Message-ID: | e8a2ecfd-220f-c0e0-8ea9-ff7938d9f9fe@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 6/26/17 15:22, zam6ak(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | tianbing | 2017-07-01 06:52:44 | BUG #14725: Partition constraint issue on multiple columns as the key of range partition |
Previous Message | Tom Lane | 2017-06-30 21:36:50 | Re: Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS |