Re: A space-efficient, user-friendly way to store categorical data - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A space-efficient, user-friendly way to store categorical data
Date
Msg-id 18097.1518388847@sss.pgh.pa.us
Whole thread Raw
In response to A space-efficient, user-friendly way to store categorical data  (Andrew Kane <andrew@chartkick.com>)
Responses Re: A space-efficient, user-friendly way to store categorical data  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
Andrew Kane <andrew@chartkick.com> writes:
> A better option could be a new "dynamic enum" type, which would have
> similar storage requirements as an enum, but instead of labels being
> declared ahead of time, they would be added as data is inserted.

You realize, of course, that it's possible to add labels to an enum type
today.  (Removing them is another story.)

You haven't explained exactly what you have in mind that is going to be
able to duplicate the advantages of the current enum implementation
without its disadvantages, so it's hard to evaluate this proposal.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: ALTER TABLE ADD COLUMN fast default
Next
From: Andrew Dunstan
Date:
Subject: Re: A space-efficient, user-friendly way to store categorical data