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 8A81C3A6239 for ; Mon, 13 Dec 2004 13:49:28 +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 19793-07 for ; Mon, 13 Dec 2004 13:49:20 +0000 (GMT) Received: from sharp.noc24x7.com (unknown [69.56.128.138]) by svr1.postgresql.org (Postfix) with ESMTP id 189413A622E for ; Mon, 13 Dec 2004 13:49:23 +0000 (GMT) Received: from [61.3.110.132] (helo=thenilgiris.com) by sharp.noc24x7.com with esmtpa (Exim 4.43) id 1CdqZm-0004GK-Lb; Mon, 13 Dec 2004 19:19:23 +0530 Received: from localhost (localhost [[UNIX: localhost]]) by thenilgiris.com (8.11.2/8.11.2) id iBDDhPJ07089; Mon, 13 Dec 2004 19:13:25 +0530 Content-Type: text/plain; charset="iso-8859-1" From: Kenneth Gonsalves To: Richard Huxton Subject: Re: mysql set datatype Date: Mon, 13 Dec 2004 19:13:25 +0530 X-Mailer: KMail [version 1.2] Cc: pgsql-sql@postgresql.org References: <0412131631332P.21547@thenilgiris.com> <41BD985C.4030102@archonet.com> In-Reply-To: <41BD985C.4030102@archonet.com> MIME-Version: 1.0 Message-Id: <04121319132500.06834@thenilgiris.com> Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sharp.noc24x7.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - thenilgiris.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.343 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200412/84 X-Sequence-Number: 19704 On Monday 13 December 2004 06:55 pm, Richard Huxton wrote: > 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? just porting kg