Re: Bit Mapping operation

From: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
To: Najm Hashmi <najm(at)flipr(dot)com>
Cc: pgsql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Bit Mapping operation
Date: 2001-06-12 21:04:49
Message-ID: 20010612140315.A45875-100000@oddjob.adhesivemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jimmie Fulton 2001-06-12 21:15:13 Inheritance - Multiple membership
Previous Message Thalis A. Kalfigopoulos 2001-06-12 20:55:56 Re: Please help! Functions passing records between them