From: Seb <spluque@gmail.com>
To: pgsql-sql@postgresql.org
Subject: enum data type vs table
Date: Tue, 17 May 2011 23:23:38 -0500
Message-ID: <87ipt8tz5h.fsf@kolob.subpolar.dyndns.org> (raw)
Hi,
Are there any guidelines for deciding whether to 1) create an enum data
type or 2) create a table with the set of values and then have foreign
keys referencing this table? Some fields in a database take a small
number of values, and I'm not sure which of these routes to take. The
enum data type seems like a clean way to handle this without creating a
constellation of tables for all these values, but if one wants to add a
new label to the enum or make changes to it at some point, then the
tables using it have to be recreated, so it's quite rigid. Have I got
this right? Thanks.
--
Seb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: spluque@gmail.com
Subject: Re: enum data type vs table
In-Reply-To: <87ipt8tz5h.fsf@kolob.subpolar.dyndns.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox