Re: WIP: extensible enums

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: WIP: extensible enums
Дата
Msg-id 4CC46344.9040005@dunslane.net
обсуждение исходный текст
Ответ на Re: WIP: extensible enums  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: WIP: extensible enums  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 10/24/2010 12:20 PM, Tom Lane wrote:
>   With float4 the implementation would fail at somewhere
> around 2^24 elements in an enum (since even with renumbering, there
> wouldn't be enough bits to give each element a distinguishable value).
> I don't see that as a real objection, and anyway if you were trying
> to have an enum with many elements, you'd want the in-memory
> representation to be compact.

Anything beyond the square root of this is getting pretty insane, 
IMNSHO, so I'm really not that bothered by that number.

Assuming we renumber the sortorder as even positive integers, that 
number comes down a couple of bits, but even so that gives us lots of 
head room I think.

cheers

andrew


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

Предыдущее
От: Terry Laurenzo
Дата:
Сообщение: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: WIP: extensible enums