Re: Enums again

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Kaare Rasmussen <kar(at)kakidata(dot)dk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Enums again
Date: 2005-11-08 08:18:52
Message-ID: 43705F6C.80508@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> So, instead of using enums for order states or originating system, I'll
> user numbers or text? Or implement lookup tables ?

Use a text field and a CHECK constraint if you have just a couple of
states, and a lookup table if you have many.

Always use a lookup table if you plan on adding new states regularly.

Chris

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Lars Kanis 2005-11-08 08:23:32 Re: Problems with index-scan on regexp in 8.1
Previous Message Kaare Rasmussen 2005-11-08 08:12:27 Re: Enums again