ALTER TYPE ... ADD VALUE issue

From: Victor Yegorov <vyegorov(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: ALTER TYPE ... ADD VALUE issue
Date: 2014-10-20 18:30:50
Message-ID: CAGnEbohD7bcQ3_R4qC9pPOj73KSjPFVNXbgRT2RQE7EPz6+wkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings.

I'm observing the following on 9.3.5 and also on 9.4beta3:

\set AUTOCOMMIT on
CREATE TYPE enum_type AS ENUM ('bad', 'good');
CREATE TYPE
ALTER TYPE enum_type ADD VALUE 'so-so' AFTER 'bad';
ALTER TYPE
DROP TYPE enum_type;
DROP TYPE;
\set AUTOCOMMIT off
CREATE TYPE enum_type AS ENUM ('bad', 'good');
CREATE TYPE
COMMIT;
COMMIT
ALTER TYPE enum_type ADD VALUE 'so-so' AFTER 'bad';
ERROR: ALTER TYPE ... ADD cannot run inside a transaction block

What is wrong here?

--
Victor Y. Yegorov

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-10-20 18:43:53 Re: ALTER TYPE ... ADD VALUE issue
Previous Message David G Johnston 2014-10-20 17:45:26 Re: problem in to_char( ) ?