Re: sql can i substitute - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: sql can i substitute
Date
Msg-id 20041217150100.GC21935@wolff.to
Whole thread Raw
In response to Re: sql can i substitute  (Kenneth Gonsalves <lawgon@thenilgiris.com>)
List pgsql-sql
On Fri, Dec 17, 2004 at 18:22:48 +0530, Kenneth Gonsalves <lawgon@thenilgiris.com> wrote:
> On Friday 17 December 2004 06:12 pm, D'Arcy J.M. Cain wrote:
> 
> > An alternative to Andreas' suggestion would be to create a simple lookup
> > table and join them.  This is good if the real life example can get
> > larger and/or the list can change and you don't want to modify code
> > every time it does.
> 
> yes, but in this case the list wont change, and i'm trying to port mysql to 
> pgsql without disturbing as far as possible the mysql queries. basically 
> replacing some 'set' and 'enum' datatypes - one table has six of thes, and 
> adding six tables is not on

You might be better off using domains and a constraint to implement
set types. Storing numbers instead of names will save a little space,
but unless you are having some problems with resources, using the strings
directly will be simpler.


pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: sql can i substitute
Next
From: John DeSoi
Date:
Subject: Re: Table History