X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5B55A3CCC9A for ; Fri, 17 Dec 2004 14:48:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 97790-05 for ; Fri, 17 Dec 2004 14:48:07 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id C2A413CCCA7 for ; Fri, 17 Dec 2004 14:48:10 +0000 (GMT) Received: (qmail 22659 invoked by uid 500); 17 Dec 2004 15:01:00 -0000 Date: Fri, 17 Dec 2004 09:01:00 -0600 From: Bruno Wolff III To: Kenneth Gonsalves Cc: "D'Arcy J.M. Cain" , pgsql-sql@postgresql.org Subject: Re: sql can i substitute Message-ID: <20041217150100.GC21935@wolff.to> Mail-Followup-To: Kenneth Gonsalves , "D'Arcy J.M. Cain" , pgsql-sql@postgresql.org References: <0412171655451H.06834@thenilgiris.com> <20041217074257.42a44460.darcy@druid.net> <0412171822481N.06834@thenilgiris.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0412171822481N.06834@thenilgiris.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/126 X-Sequence-Number: 19746 On Fri, Dec 17, 2004 at 18:22:48 +0530, Kenneth Gonsalves 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.