pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Kenneth Gonsalves <lawgon@thenilgiris.com>
Cc: D'Arcy J.M. Cain <darcy@druid.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: sql can i substitute
Date: Fri, 17 Dec 2004 09:01:00 -0600
Message-ID: <20041217150100.GC21935@wolff.to> (raw)
In-Reply-To: <0412171822481N.06834@thenilgiris.com>
References: <0412171655451H.06834@thenilgiris.com>
	<20041217074257.42a44460.darcy@druid.net>
	<0412171822481N.06834@thenilgiris.com>

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.



view thread (10+ messages)

Message-ID: <20041217150100.GC21935@wolff.to>
Permalink:  ../20041217150100.GC21935@wolff.to/
Also on:    postgresql.org/message-id/20041217150100.GC21935@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bruno@wolff.to, lawgon@thenilgiris.com, darcy@druid.net
  Subject: Re: sql can i substitute
  In-Reply-To: <20041217150100.GC21935@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox