From najm@flipr.com Tue Jun 12 16:25:09 2001 Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5CGP9E37317 for ; Tue, 12 Jun 2001 12:25:09 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from localhost.localdomain ([216.221.221.2]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5BFsrE55698 for ; Mon, 11 Jun 2001 11:54:53 -0400 (EDT) (envelope-from najm@flipr.com) Received: from flipr.com (IDENT:najm@localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.9.3/8.9.3) with ESMTP id LAA01083 for ; Mon, 11 Jun 2001 11:54:44 -0400 Message-ID: <3B24E9C3.73ACA3E8@flipr.com> Date: Mon, 11 Jun 2001 11:54:43 -0400 From: Najm Hashmi X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql Subject: Bit Mapping operation Content-Type: multipart/alternative; boundary="------------4F9F0D7B6C08F289B3AC934E" X-Archive-Number: 200106/182 X-Sequence-Number: 3416 --------------4F9F0D7B6C08F289B3AC934E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, I am just wondering if bit map operations are possible in pl/pgsql. We are storing sixteen different (one or many ... i.e. check boxes ) choices in a small int. For data cruchinging reasons, we need to reverse the process to find out what what fields where selected or checked. Is this info somewhere in the docs? Thanks in advance. Regards, -- Najm Hashmi Tel:514-271-9791 www.mondo-live.com www.flipr.com --------------4F9F0D7B6C08F289B3AC934E Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, I am just wondering if bit map operations are possible in pl/pgsql.  We are storing sixteen different  (one or many ... i.e. check boxes ) choices in a  small int. For data cruchinging reasons, we need to reverse  the process to find out what what fields where selected or checked. Is this info somewhere in the docs?
Thanks in advance.
Regards,
-- 
Najm Hashmi
Tel:514-271-9791
www.mondo-live.com
www.flipr.com
  --------------4F9F0D7B6C08F289B3AC934E-- From oleg@sai.msu.su Tue Jun 12 19:39:37 2001 Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5CJdbE47451 for ; Tue, 12 Jun 2001 15:39:37 -0400 (EDT) (envelope-from oleg@sai.msu.su) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.9.3/8.9.3) with ESMTP id WAA12339; Tue, 12 Jun 2001 22:38:17 +0300 (GMT) Date: Tue, 12 Jun 2001 22:38:17 +0300 (GMT) From: Oleg Bartunov X-X-Sender: To: Najm Hashmi cc: pgsql Subject: Re: Bit Mapping operation In-Reply-To: <3B24E9C3.73ACA3E8@flipr.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200106/186 X-Sequence-Number: 3442 no bitmap indexes available yet. But I'd recommend you to check contrib/intarray which adds indexed access to array of int. You may store array of 16 int4 for each record. Regards, Oleg On Mon, 11 Jun 2001, Najm Hashmi wrote: > Hi all, I am just wondering if bit map operations are possible in > pl/pgsql. We are storing sixteen different (one or many ... i.e. check > boxes ) choices in a small int. For data cruchinging reasons, we need > to reverse the process to find out what what fields where selected or > checked. Is this info somewhere in the docs? > Thanks in advance. > Regards, > > -- > Najm Hashmi > Tel:514-271-9791 > www.mondo-live.com > www.flipr.com > > > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83 From philip@adhesivemedia.com Tue Jun 12 21:04:54 2001 Received: from oddjob.adhesivemedia.com (oddjob.adhesivemedia.com [207.202.159.77]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5CL4sE94233 for ; Tue, 12 Jun 2001 17:04:54 -0400 (EDT) (envelope-from philip@adhesivemedia.com) Received: from localhost (philip@localhost) by oddjob.adhesivemedia.com (8.11.1/8.11.1) with ESMTP id f5CL4nP52691; Tue, 12 Jun 2001 14:04:49 -0700 (PDT) (envelope-from philip@adhesivemedia.com) Date: Tue, 12 Jun 2001 14:04:49 -0700 (PDT) From: Philip Hallstrom To: Najm Hashmi cc: pgsql Subject: Re: Bit Mapping operation In-Reply-To: <3B24E9C3.73ACA3E8@flipr.com> Message-ID: <20010612140315.A45875-100000@oddjob.adhesivemedia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200106/190 X-Sequence-Number: 3446 In 7.1 it's there... using the |(or) &(and), etc.. operators. In 7.0.3 it's not although can be added easily. example: test=> select 2 | 1; ?column? ---------- 3 (1 row) test=> select 2 & 1; ?column? ---------- 0 (1 row) test=> select 3 & 1; ?column? ---------- 1 (1 row) test=> On Mon, 11 Jun 2001, Najm Hashmi wrote: > Hi all, I am just wondering if bit map operations are possible in > pl/pgsql. We are storing sixteen different (one or many ... i.e. check > boxes ) choices in a small int. For data cruchinging reasons, we need > to reverse the process to find out what what fields where selected or > checked. Is this info somewhere in the docs? > Thanks in advance. > Regards, > > -- > Najm Hashmi > Tel:514-271-9791 > www.mondo-live.com > www.flipr.com > > >