Re: [BUGS] BUG #14718: unable to update table with identity columnGENERATED ALWAYS

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [BUGS] BUG #14718: unable to update table with identity columnGENERATED ALWAYS
Дата
Msg-id e8a2ecfd-220f-c0e0-8ea9-ff7938d9f9fe@2ndquadrant.com
обсуждение исходный текст
Ответ на [BUGS] BUG #14718: unable to update table with identity column GENERATEDALWAYS  (zam6ak@gmail.com)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] Re: BUG #14718: unable to update table with identity column GENERATED ALWAYS
Следующее
От: tianbing@highgo.com
Дата:
Сообщение: [BUGS] BUG #14725: Partition constraint issue on multiple columns as the keyof range partition