pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philip Hallstrom <philip@adhesivemedia.com>
To: Najm Hashmi <najm@flipr.com>
Cc: pgsql <pgsql-sql@postgresql.org>
Subject: Re: Bit Mapping operation
Date: Tue, 12 Jun 2001 14:04:49 -0700 (PDT)
Message-ID: <20010612140315.A45875-100000@oddjob.adhesivemedia.com> (raw)
In-Reply-To: <3B24E9C3.73ACA3E8@flipr.com>

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
>
>
>




view thread (3+ messages)

Message-ID: <20010612140315.A45875-100000@oddjob.adhesivemedia.com>
Permalink:  ../20010612140315.A45875-100000@oddjob.adhesivemedia.com/
Also on:    postgresql.org/message-id/20010612140315.A45875-100000@oddjob.adhesivemedia.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: philip@adhesivemedia.com, najm@flipr.com
  Subject: Re: Bit Mapping operation
  In-Reply-To: <20010612140315.A45875-100000@oddjob.adhesivemedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox