Re: Allow deleting enumerated values from an existing enumerated data type

Vik Fearing <vik@postgresfriends.org>

From: Vik Fearing <vik@postgresfriends.org>
To: Данил Столповских <danil.stolpovskikh@gmail.com>, pgsql-hackers@postgresql.org
Cc: o.tselebrovskiy@postgrespro.ru, d.frolov@postgrespro.ru
Date: 2023-09-28T13:50:58Z
Lists: pgsql-hackers
On 9/28/23 14:13, Данил Столповских wrote:
> Greetings, everyone!
> I would like to offer my patch on the problem of removing values from enums
> 
> It adds support for expression ALTER TYPE <enum_name> DROP VALUE
> <value_name>
> 
> Added:
> 1. expression in grammar
> 2. function to drop enum values
> 3. regression tests
> 4. documentation

Thanks for this patch that a lot of people want.

However, it does not seem to address the issue of how to handle the 
dropped value being in the high key of an index.  Until we solve that 
problem (and maybe others), this kind of patch is insufficient to add 
the feature.
-- 
Vik Fearing




Commits

  1. Add some notes about why "ALTER TYPE enum DROP VALUE" is hard.