Re: [ADMIN] Problems with enums after pg_upgrade

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [ADMIN] Problems with enums after pg_upgrade
Дата
Msg-id 50D1F45E.3060105@dunslane.net
обсуждение исходный текст
Ответ на Re: [ADMIN] Problems with enums after pg_upgrade  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [ADMIN] Problems with enums after pg_upgrade
Список pgsql-hackers
On 12/19/2012 11:31 AM, Tom Lane wrote:
> enum_add is all right as long as you are careful to commit its
> transaction before inserting the new value anywhere.
>
>             

It's not really all right for post-9.0 versions. For example, this is wrong:

>     --postgres 9.2 or higher
>     IF version_int > 90200 THEN


It should really be "IF version_int >= 90100 THEN"

what is even worse is that this procedure doesn't take any care at all 
of the ordering rule for even numbered enum oids. We could have oid 
wraparound to an even numbered oid and it would break the rule.

cheers

andrew




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

Предыдущее
От: Pavan Deolasee
Дата:
Сообщение: Re: Set visibility map bit after HOT prune
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Cascading replication: should we detect/prevent cycles?