[BUGS] BUG #14825: enum type: unsafe use?

Поиск
Список
Период
Сортировка
От balazs@obiserver.hu
Тема [BUGS] BUG #14825: enum type: unsafe use?
Дата
Msg-id 20170922185904.1448.16585@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: [BUGS] BUG #14825: enum type: unsafe use?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14825
Logged by:          Balazs Szilfai
Email address:      balazs@obiserver.hu
PostgreSQL version: 10beta4
Operating system:   Debian Linux
Description:

Hi,

version: 10rc1

testdb=# begin;
BEGIN
testdb=# create type enumtype as enum ('v1', 'v2');
CREATE TYPE
testdb=# create table testtable (enumcolumn enumtype not null default
'v1');
CREATE TABLE

Everything it's OK! :)

If enum type have "owner to":

testdb=# begin;
BEGIN
testdb=# create type enumtype as enum ('v1', 'v2');
CREATE TYPE
testdb=# alter type enumtype owner to testrole;
ALTER TYPE
testdb=# create table testtable (enumcolumn enumtype not null default
'v1');
ERROR:  unsafe use of new value "v1" of enum type enumtype
HINT:  New enum values must be committed before they can be used.

Is this unsafe?

Balazs


--
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] i find an error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #14825: enum type: unsafe use?