Re: Can we only add values to enums?

Поиск
Список
Период
Сортировка
От Jonathan S. Katz
Тема Re: Can we only add values to enums?
Дата
Msg-id 9BE4F44F-4D9B-43C8-82D5-9B26902EC255@postgresql.org
обсуждение исходный текст
Ответ на Re: Can we only add values to enums?  (Euler Taveira <euler@timbira.com.br>)
Ответы Re: Can we only add values to enums?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-docs
> On Mar 15, 2018, at 11:33 PM, Euler Taveira <euler@timbira.com.br> wrote:
>
> 2018-03-12 20:28 GMT-03:00 PG Doc comments form <noreply@postgresql.org>:
>> I need to add a value to an enum, so I found this page, which answered my
>> question. However, I found it quite confusing that it only documents adding
>> a value. I would expect it to also document how to remove a value from an
>> enum? Is this not possible? If not, I consider it a bug. But either way, if
>> it is not possible, you should explicitly document it on this page.
>>
> If it is not document, this means that it is not supported. It is not
> a bug. It is by design. Read the discussion about this feature at [1].
> Removing a enum value requires a table rewrite. I'm not sure it is
> worth a note.

I would say that’s the exact reason why it should be documented,
so it’s clear that it was by design.

We could also redirect people to DOMAINs if they need more
flexibility in what is added/removed from an “enum-like” type.

Jonathan



В списке pgsql-docs по дате отправления:

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: prog
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Can we only add values to enums?