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 5E2BA3A6061 for ; Mon, 13 Dec 2004 13:26:12 +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 07407-08 for ; Mon, 13 Dec 2004 13:25:59 +0000 (GMT) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr1.postgresql.org (Postfix) with ESMTP id 133BE3A3B8C for ; Mon, 13 Dec 2004 13:26:01 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-34.mail.demon.net with esmtp (Exim 4.42) id 1CdqD9-0009DA-Ei; Mon, 13 Dec 2004 13:26:02 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id C95F015A7C; Mon, 13 Dec 2004 13:25:49 +0000 (GMT) Message-ID: <41BD985C.4030102@archonet.com> Date: Mon, 13 Dec 2004 13:25:48 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kenneth Gonsalves Cc: pgsql-sql@postgresql.org Subject: Re: mysql set datatype References: <0412131631332P.21547@thenilgiris.com> In-Reply-To: <0412131631332P.21547@thenilgiris.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.118 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/83 X-Sequence-Number: 19703 Kenneth Gonsalves wrote: > hi, > how does one replicate the myql 'set' datatype in pg? i tried using 'check', > but apparently there is much more to this You could use a bit-string if you are just tracking set membership, but that doesn't exactly duplicate the behaviour. It should be straightforward enough to write some support functions and just use a text type, but that'd use a lot more storage. Of course, another table is the accepted way of doing this relationally. Are there any particular features you need, or are you just porting an application from Mysql? -- Richard Huxton Archonet Ltd