From: | balazs(at)obiserver(dot)hu |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Cc: | balazs(at)obiserver(dot)hu |
Subject: | BUG #14825: enum type: unsafe use? |
Date: | 2017-09-22 18:59:04 |
Message-ID: | 20170922185904.1448.16585@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
The following bug has been logged on the website:
Bug reference: 14825
Logged by: Balazs Szilfai
Email address: balazs(at)obiserver(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-09-22 21:46:08 | Re: [BUGS] BUG #14825: enum type: unsafe use? |
Previous Message | David G. Johnston | 2017-09-22 13:54:46 | Re: i find an error |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-09-22 19:06:11 | Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction |
Previous Message | Robert Haas | 2017-09-22 18:36:31 | Re: "inconsistent page found" with checksum and wal_consistency_checking enabled |