Re: WIP: extensible enums - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: WIP: extensible enums
Date
Msg-id 4CC46344.9040005@dunslane.net
Whole thread Raw
In response to Re: WIP: extensible enums  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: extensible enums
List 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 by date:

Previous
From: Terry Laurenzo
Date:
Subject: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Next
From: Dean Rasheed
Date:
Subject: Re: WIP: extensible enums