pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: pgsql-bugs@lists.postgresql.org
To: nivruth_n@yahoo.com
Subject: Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
Date: Fri, 20 Jul 2018 06:15:29 +0100
Message-ID: <878t66jxr3.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <153206236870.1405.3502568417414309750@wrigleys.postgresql.org>
References: <153206236870.1405.3502568417414309750@wrigleys.postgresql.org>

>>>>> "PG" == PG Bug reporting form <noreply@postgresql.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)




view thread (6+ messages)  latest in thread

Message-ID: <878t66jxr3.fsf@news-spur.riddles.org.uk>
Permalink:  ../878t66jxr3.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/878t66jxr3.fsf@news-spur.riddles.org.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, nivruth_n@yahoo.com
  Subject: Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
  In-Reply-To: <878t66jxr3.fsf@news-spur.riddles.org.uk>
  References: <153206236870.1405.3502568417414309750@wrigleys.postgresql.org> <878t66jxr3.fsf@news-spur.riddles.org.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox