Re: ENUM vs DOMAIN vs FKyed loookup table - Mailing list pgsql-sql

From Jasen Betts
Subject Re: ENUM vs DOMAIN vs FKyed loookup table
Date
Msg-id gs4ljg$hkd$1@reversiblemaps.ath.cx
Whole thread Raw
In response to ENUM vs DOMAIN vs FKyed loookup table  (Mario Splivalo <mario.splivalo@megafon.hr>)
List pgsql-sql
On 2009-04-12, Dirk Jagdmann <jagdmann@gmail.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.



pgsql-sql by date:

Previous
From: Jasen Betts
Date:
Subject: Re: changing multiple pk's in one update
Next
From: Tom Lane
Date:
Subject: Re: Postgres process resident size does not drop after killing statement