Feature request: improving ENUM type manipulation

Поиск
Список
Период
Сортировка
От
Тема Feature request: improving ENUM type manipulation
Дата
Msg-id 29F36C7C98AB09499B1A209D48EAA615B7653DBCD2@mail2a.alliedtesting.com
обсуждение исходный текст
Список pgsql-general
Until v. 9.1 enum modification was not officially supported, although hacking pg_enum made it somewhat workable. Since
v.9.1 there is a way to add values to enum types. However, 

- alter type ... add value doesn't work in transaction blocks, which severely limits its usefulness
- there is still no supported way to delete values from an enum

Worse still, old hacks for adding enum values no longer work. There are some good technical reasons for all this,
which,for those who are interested, have been discussed recently in psql-bugs. 

All the same, I think a better support for enum modification would be very desirable, more so than for other custom
types. The reason has to do with the very nature of an enum - an enumeration, a representation of a set, which, in
general,implies open-endedness.  Some sets that may be represented by an enum do not imply extensibility, e.g. days of
theweek (barring another French revolution!)  But many more do.  In my practice, when considering implementation of a
set-likeentity, extensibility is a crucial consideration. 

For those interested in the discussion that led to this post, look for "Problems with ENUM type manipulation in 9.1"
threadin psql-bugs. 

Dmitry Epstein | Developer

Allied Testing
T + 7 495 544 48 69 Ext 417

www.alliedtesting.com
We Deliver Quality.



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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Create Extension search path
Следующее
От: Marti Raudsepp
Дата:
Сообщение: Re: bytea columns and large values