Re: Allow deleting enum value

2020-10-25 Thread Justin Pryzby
On Wed, Oct 07, 2020 at 11:47:07PM +0300, Maksim Kita wrote: > I like the idea, during prototype I added additional column and modified > enum_in method. But enum_in is called in contexts that can be important > for user (like comparisons). ... > postgres=# ALTER TYPE test_enum DELETE VALUE '2'; >

Re: Allow deleting enum value

2020-10-07 Thread Maksim Kita
I like the idea, during prototype I added additional column and modified enum_in method. But enum_in is called in contexts that can be important for user (like comparisons). Example: postgres=# CREATE TYPE test_enum AS enum ('1', '2', '3'); CREATE TYPE postgres=# CREATE TABLE test_table ( value

Re: Allow deleting enum value

2020-10-07 Thread Tom Lane
I wrote: > That TODO item should either be removed or marked with a warning stating > that it's next door to impossible. (Unfortunately, a lot of our TODO > items are like that ... there's usually a good reason why they're not > done already.) Actually ... I'm not sure if this idea has been discu

Re: Allow deleting enum value

2020-10-07 Thread Tom Lane
Maksim Kita writes: > There is a question related to TODO task with name "Allow deleting enumerated > values from an existing enumerated data type". > I made simple changes in parser and implement RemoveEnumLabel function, but > as I understand if enum value that we want to > delete is in use b

Allow deleting enum value

2020-10-07 Thread Maksim Kita
Hi, There is a question related to TODO task with name "Allow deleting enumerated values from an existing enumerated data type". I made simple changes in parser and implement RemoveEnumLabel function, but as I understand if enum value that we want to delete is in use by some tables, we have to