Re: Enums again - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Enums again
Date
Msg-id 43705F6C.80508@familyhealth.com.au
Whole thread Raw
In response to Re: Enums again  ("Kaare Rasmussen" <kar@kakidata.dk>)
List 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



pgsql-hackers by date:

Previous
From: "Kaare Rasmussen"
Date:
Subject: Re: Enums again
Next
From: Lars Kanis
Date:
Subject: Re: Problems with index-scan on regexp in 8.1