Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org, nivruth_n(at)yahoo(dot)com
Subject: Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
Date: 2018-07-20 05:15:29
Message-ID: 878t66jxr3.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>>>>> "PG" == PG Bug reporting form <noreply(at)postgresql(dot)org> writes:

PG> I'm trying to modify an existing enum and use the BEFORE or AFTER
PG> feature to add a value in between the existing values but I'm
PG> noticing that the values are only being added to the enum in the
PG> end.

How are you looking at the order of values?

I get this:

create type e1 as enum ('foo','bar','baz');
alter type e1 add value 'quux' after 'foo';

postgres=# select * from unnest(enum_range(null::e1)) order by 1;
unnest
--------
foo
quux
bar
baz
(4 rows)

which is the expected order.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nivruth Nandigam 2018-07-20 05:26:26 Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
Previous Message PG Bug reporting form 2018-07-20 04:52:48 BUG #15286: BEFORE or AFTER not working while adding values for existing enums