Re: enumerated type..

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Michael Kleiser <mkl(at)webde-ag(dot)de>
Cc: raptor(at)tvskat(dot)net, pgsql-general(at)postgresql(dot)org
Subject: Re: enumerated type..
Date: 2004-07-19 15:43:34
Message-ID: 20040719154334.GA28349@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 19, 2004 at 16:46:08 +0200,
Michael Kleiser <mkl(at)webde-ag(dot)de> wrote:
> I don`t know, if there is a special feature in postgresql for this.
> The standard SQL-way is to create a lookup-table and define a foreign-key
> to it.

You could also use a domain which constrains one of its columns to a
few values. I don't think this would be appropiate for a large list,
like the list of use states. But you might do this when there are fewer
values and you don't expect the list to change.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scrappy 2004-07-19 18:25:23 Re:
Previous Message Tom Lane 2004-07-19 14:59:22 Re: special table queries slow until dump/restore