[BUGS] BUG #14718: unable to update table with identity column GENERATEDALWAYS

Поиск
Список
Период
Сортировка
От zam6ak@gmail.com
Тема [BUGS] BUG #14718: unable to update table with identity column GENERATEDALWAYS
Дата
Msg-id 20170626192252.17679.77403@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: [BUGS] BUG #14718: unable to update table with identity columnGENERATED ALWAYS  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [BUGS] BUG #14718: unable to update table with identity columnGENERATED ALWAYS  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14718
Logged by:          zam6ak
Email address:      zam6ak@gmail.com
PostgreSQL version: 10beta1
Operating system:   Windows Server 2012 R2
Description:

I have downloaded a PG10 distro for Windows from BigSQL.

if I try to update table that uses identity column generated always, the
update fails...

If I switch to "generated by default" it works...


-- create tbl1
create table tbl1 ( id   bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,    -- fails --id   bigint GENERATED BY
DEFAULTAS 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.

********** Error **********

ERROR: column "id" can only be updated to DEFAULT
SQL state: 428C9
Detail: Column "id" is an identity column defined as GENERATED ALWAYS.


--
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 по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [BUGS] Problems installation
Следующее
От: "Caio Parolin"
Дата:
Сообщение: RES: [BUGS] Problems installation