Re: A space-efficient, user-friendly way to store categorical data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Kane <andrew(at)chartkick(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: A space-efficient, user-friendly way to store categorical data
Date: 2018-02-11 22:40:47
Message-ID: 18097.1518388847@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Kane <andrew(at)chartkick(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2018-02-11 23:24:29 Re: A space-efficient, user-friendly way to store categorical data
Previous Message Andrew Dunstan 2018-02-11 21:36:44 Re: ALTER TABLE ADD COLUMN fast default