Re: [BUGS] BUG #14825: enum type: unsafe use? - Mailing list pgsql-bugs

From Christophe Pettus
Subject Re: [BUGS] BUG #14825: enum type: unsafe use?
Date
Msg-id 9C898B52-A75C-4CA1-84DD-8B89051DFEB2@pgexperts.com
Whole thread Raw
In response to Re: [BUGS] BUG #14825: enum type: unsafe use?  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-bugs
> On Sep 25, 2017, at 07:55, Andrew Dunstan <andrew.dunstan@2ndquadrant.com> wrote:
> Let's ask a couple of users who I think are or have been actually
> hurting on this point. Christophe and David, any opinions?

Since about 90% of what I encounter in this area are automatically-generated migrations, having a clear set of (perhaps
restrictive)rules which never fail is the most important.  It's easy to split the CREATE or ALTERs out into their own
transaction,and leave usage (such as populating a table from a migration) to a second transaction. 

It's not clear to me that this is a vote either way, but I think the easiest thing to explain ("you cannot use a new
enumvalue in the same transaction that created it") is the best in this situation. 

--
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 by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: [BUGS] Re: BUG #14785: Logical replication does not work afteradding a column. Bug?
Next
From: "David E. Wheeler"
Date:
Subject: Re: [BUGS] BUG #14825: enum type: unsafe use?