Re: WIP: extensible enums

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: extensible enums
Date: 2010-10-24 07:41:20
Message-ID: AANLkTinSYJ=w1WZ+vWRnqTGZ00Q8wdUPYAp6n=kZuiGq@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 23, 2010 at 10:11 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> I dunno if floats have completely
> consistent representations on all the platforms we support, but with
> integers it should be quite easy to predict the exact point when
> you're going to run out of space and what the contents of pg_enum
> should be just before and just after that point.

There's nothing magic about the integral types here. If you use a
string then you could always split by making the string longer. It
would get weird after you get to 256 (you can still handle it but
there would be weird special case code) but an array of integers would
be just as flexible and wouldn't have the same problem.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2010-10-24 09:50:09 Re: ask for review of MERGE
Previous Message Greg Stark 2010-10-24 07:32:13 Re: ask for review of MERGE