pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15286: BEFORE or AFTER not working while adding values for existing enums
6+ messages / 3 participants
[nested] [flat]
* BUG #15286: BEFORE or AFTER not working while adding values for existing enums
@ 2018-07-20 04:52 PG Bug reporting form <noreply@postgresql.org>
2018-07-20 05:15 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
0 siblings, 1 reply; 6+ messages in thread
From: PG Bug reporting form @ 2018-07-20 04:52 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: nivruth_n@yahoo.com
The following bug has been logged on the website:
Bug reference: 15286
Logged by: Nivruth Nandigam
Email address: nivruth_n@yahoo.com
PostgreSQL version: 10.4
Operating system: Windows
Description:
Hi there,
I'm trying to modify an existing enum and use the BEFORE or AFTER feature to
add a value in between the existing values but I'm noticing that the values
are only being added to the enum in the end. Please look into this and fix
this as soon as possible. The query I'm using is
alter type my_enum add value 'second' after 'one;
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
2018-07-20 04:52 BUG #15286: BEFORE or AFTER not working while adding values for existing enums PG Bug reporting form <noreply@postgresql.org>
@ 2018-07-20 05:15 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-07-20 05:26 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Nivruth Nandigam <nivruth_n@yahoo.com>
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Gierth @ 2018-07-20 05:15 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; nivruth_n@yahoo.com
>>>>> "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)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
2018-07-20 04:52 BUG #15286: BEFORE or AFTER not working while adding values for existing enums PG Bug reporting form <noreply@postgresql.org>
2018-07-20 05:15 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
@ 2018-07-20 05:26 ` Nivruth Nandigam <nivruth_n@yahoo.com>
2018-07-20 05:48 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
0 siblings, 1 reply; 6+ messages in thread
From: Nivruth Nandigam @ 2018-07-20 05:26 UTC (permalink / raw)
To: andrew@tao11.riddles.org.uk <andrew@tao11.riddles.org.uk>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Right clicking on the source and then checking the values. Executing this query also gives me the values in order but shouldn't the enum also reflect the order when right clicked and checked?
Also, when I try to set this as a db column I see the wrong order in the drop down, the added values appear last in the drop down menu of the enum column.
Sent from Yahoo Mail on Android
On Thu, Jul 19, 2018 at 10:15 PM, Andrew Gierth<andrew@tao11.riddles.org.uk> wrote: >>>>> "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)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
2018-07-20 04:52 BUG #15286: BEFORE or AFTER not working while adding values for existing enums PG Bug reporting form <noreply@postgresql.org>
2018-07-20 05:15 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-07-20 05:26 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Nivruth Nandigam <nivruth_n@yahoo.com>
@ 2018-07-20 05:48 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-07-20 13:54 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Nivruth Nandigam <nivruth_n@yahoo.com>
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Gierth @ 2018-07-20 05:48 UTC (permalink / raw)
To: Nivruth Nandigam <nivruth_n@yahoo.com>; +Cc: pgsql-bugs\@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
>>>>> "Nivruth" == Nivruth Nandigam <nivruth_n@yahoo.com> writes:
Nivruth> Right clicking
Postgresql does not have anything that you could "right click" on. Any
graphical tool you might be using (whether it's pgadmin or something
else) is a separate project; bugs in such projects are NOT handled on
this list.
--
Andrew.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
2018-07-20 04:52 BUG #15286: BEFORE or AFTER not working while adding values for existing enums PG Bug reporting form <noreply@postgresql.org>
2018-07-20 05:15 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-07-20 05:26 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Nivruth Nandigam <nivruth_n@yahoo.com>
2018-07-20 05:48 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
@ 2018-07-20 13:54 ` Nivruth Nandigam <nivruth_n@yahoo.com>
2018-07-20 15:14 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
0 siblings, 1 reply; 6+ messages in thread
From: Nivruth Nandigam @ 2018-07-20 13:54 UTC (permalink / raw)
To: andrew@tao11.riddles.org.uk <andrew@tao11.riddles.org.uk>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Thanks Andrew, that makes sense. Could you also please answer these questions if possible?
impact to table on adding values to existing enum postgresql
|
|
|
| | |
|
|
|
| |
impact to table on adding values to existing enum postgresql
I am new to PostgreSQL and using enum (MY_ENUM) as a column type for a table (MY_TABLE). Let's say MY_ENUM has values ('one', 'three', 'four') with default 'one' and there are 1 million records in
| |
|
|
Thanks,Nivruth
Sent from Yahoo Mail on Android
On Thu, Jul 19, 2018 at 10:48 PM, Andrew Gierth<andrew@tao11.riddles.org.uk> wrote: >>>>> "Nivruth" == Nivruth Nandigam <nivruth_n@yahoo.com> writes:
Nivruth> Right clicking
Postgresql does not have anything that you could "right click" on. Any
graphical tool you might be using (whether it's pgadmin or something
else) is a separate project; bugs in such projects are NOT handled on
this list.
--
Andrew.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums
2018-07-20 04:52 BUG #15286: BEFORE or AFTER not working while adding values for existing enums PG Bug reporting form <noreply@postgresql.org>
2018-07-20 05:15 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-07-20 05:26 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Nivruth Nandigam <nivruth_n@yahoo.com>
2018-07-20 05:48 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-07-20 13:54 ` Re: BUG #15286: BEFORE or AFTER not working while adding values for existing enums Nivruth Nandigam <nivruth_n@yahoo.com>
@ 2018-07-20 15:14 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Gierth @ 2018-07-20 15:14 UTC (permalink / raw)
To: Nivruth Nandigam <nivruth_n@yahoo.com>; +Cc: pgsql-bugs\@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
>>>>> "Nivruth" == Nivruth Nandigam <nivruth_n@yahoo.com> writes:
Nivruth> Thanks Andrew, that makes sense. Could you also please answer
Nivruth> these questions if possible?
[ https://stackoverflow.com/questions/51434307 ]
Adding a value to an enum does not have any impact on tables that use
the enum type, regardless of where you add the value.
--
Andrew (irc:RhodiumToad)
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-07-20 15:14 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 04:52 BUG #15286: BEFORE or AFTER not working while adding values for existing enums PG Bug reporting form <noreply@postgresql.org>
2018-07-20 05:15 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-07-20 05:26 ` Nivruth Nandigam <nivruth_n@yahoo.com>
2018-07-20 05:48 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2018-07-20 13:54 ` Nivruth Nandigam <nivruth_n@yahoo.com>
2018-07-20 15:14 ` Andrew Gierth <andrew@tao11.riddles.org.uk>
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