Re: ENUM vs DOMAIN vs FKyed loookup table

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: ENUM vs DOMAIN vs FKyed loookup table
Date: 2009-04-15 12:57:20
Message-ID: gs4ljg$hkd$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 2009-04-12, Dirk Jagdmann <jagdmann(at)gmail(dot)com> wrote:
>> When you need to choose between enum types, domain types or lookup tables
>> with foreign keys, what do you usualy choose?
>
> When I have a column with valid values that I know when writing my
> tables and that will *never* change I use an enum. For example a human
> gender type (and remember that there are 4 values for human sex if you
> want to model it completely).

"lambda moo" has even more genders than that.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2009-04-15 13:58:43 Re: Postgres process resident size does not drop after killing statement
Previous Message Jasen Betts 2009-04-15 12:43:00 Re: changing multiple pk's in one update