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 1B10E52913 for ; Tue, 28 Jun 2005 09:37:22 -0300 (ADT) 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 16468-06 for ; Tue, 28 Jun 2005 12:37:20 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 23E89528C1 for ; Tue, 28 Jun 2005 09:37:19 -0300 (ADT) Received: (qmail 20831 invoked by uid 500); 28 Jun 2005 12:37:20 -0000 Date: Tue, 28 Jun 2005 07:37:20 -0500 From: Bruno Wolff III To: MRB Cc: pgsql-sql@postgresql.org Subject: Re: ENUM like data type Message-ID: <20050628123720.GA20566@wolff.to> Mail-Followup-To: Bruno Wolff III , MRB , pgsql-sql@postgresql.org References: <11bgc1oblfasq3d@corp.supernews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11bgc1oblfasq3d@corp.supernews.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/336 X-Sequence-Number: 21937 On Tue, Jun 21, 2005 at 17:20:19 +0200, MRB wrote: > > Here is where I get uncertain as to if this is possible. My idea is to > create a pseudo type that triggers the creation of it's lookup tables > the same way the SERIAL type triggers creation of a sequence and returns > an int with the right default value. You might want to look at using a domain to do this.