Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgNlW-0006jr-QI for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jul 2018 05:15:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fgNlS-0004qq-L7 for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jul 2018 05:15:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgNlS-0004qh-Bs for pgsql-bugs@lists.postgresql.org; Fri, 20 Jul 2018 05:15:38 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgNlP-0008NM-B8 for pgsql-bugs@lists.postgresql.org; Fri, 20 Jul 2018 05:15:37 +0000 Received: from [192.168.127.1] (port=27626 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1fgNlK-000656-HQ; Fri, 20 Jul 2018 05:15:30 +0000 Received: from [127.0.0.1] (port=57595 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1fgNlJ-000HlQ-Rm; Fri, 20 Jul 2018 05:15:29 +0000 From: Andrew Gierth To: pgsql-bugs@lists.postgresql.org, nivruth_n@yahoo.com Subject: Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums In-Reply-To: <153206236870.1405.3502568417414309750@wrigleys.postgresql.org> (PG Bug reporting form's message of "Fri, 20 Jul 2018 04:52:48 +0000") Message-ID: <878t66jxr3.fsf@news-spur.riddles.org.uk> References: <153206236870.1405.3502568417414309750@wrigleys.postgresql.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Fri, 20 Jul 2018 06:15:29 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "PG" == PG Bug reporting form 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)