Re: Alter or rename enum value

Поиск
Список
Период
Сортировка
От Emre Hasegeli
Тема Re: Alter or rename enum value
Дата
Msg-id CAE2gYzx51+eJ4R+ct371ogjVBCR8aUbr4oS7LYpQaRPaTxkK8w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Alter or rename enum value  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Alter or rename enum value  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
> I do not know whether this would be a meaningful improvement for
> common use-cases, though.  (It'd help if people were more specific
> about the use-cases they need to work.)

For what its worth, in the company I am working for, InnoGames GmbH,
not being able to alter enums is the number one pain point with
PostgreSQL.  We have hundreds of small databases on the backend of the
game worlds.  They are heavily using enums.  New values to the enums
need to be added or to be removed for the new features.  We are
relying on the transactions for the database migrations, so we
couldn't make use of ALTER TYPE ADD VALUE.

Some functions found on the Internet [1] which change the values on
the catalog had been used, until they corrupted some indexes.  (I
believe those functions are still quite common.)  Now, we are using a
function to replace an enum type on all tables with another one, but
we are not at all happy with this solution.  It requires all objects
which were using the enum to be dropped and recreated, and it rewrites
the tables, so it greatly increases the migration time and effort.

[1] http://en.dklab.ru/lib/dklab_postgresql_enum/



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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Support for N synchronous standby servers - take 2
Следующее
От: Amit Langote
Дата:
Сообщение: Re: A question on systable_beginscan()