| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com> |
| Cc: | "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: sql can i substitute |
| Date: | 2004-12-17 15:01:00 |
| Message-ID: | 20041217150100.GC21935@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Fri, Dec 17, 2004 at 18:22:48 +0530,
Kenneth Gonsalves <lawgon(at)thenilgiris(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John DeSoi | 2004-12-17 15:37:48 | Re: Table History |
| Previous Message | Bruno Wolff III | 2004-12-17 14:56:53 | Re: sql can i substitute |