pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedBit Mapping operation
3+ messages / 3 participants
[nested] [flat]
* Bit Mapping operation
@ 2001-06-11 15:54 Najm Hashmi <najm@flipr.com>
0 siblings, 2 replies; 3+ messages in thread
From: Najm Hashmi @ 2001-06-11 15:54 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Bit Mapping operation
@ 2001-06-12 19:38 Oleg Bartunov <oleg@sai.msu.su>
parent: Najm Hashmi <najm@flipr.com>
1 sibling, 0 replies; 3+ messages in thread
From: Oleg Bartunov @ 2001-06-12 19:38 UTC (permalink / raw)
To: Najm Hashmi <najm@flipr.com>; +Cc: pgsql-sql
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Bit Mapping operation
@ 2001-06-12 21:04 Philip Hallstrom <philip@adhesivemedia.com>
parent: Najm Hashmi <najm@flipr.com>
1 sibling, 0 replies; 3+ messages in thread
From: Philip Hallstrom @ 2001-06-12 21:04 UTC (permalink / raw)
To: Najm Hashmi <najm@flipr.com>; +Cc: 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
>
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-06-12 21:04 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-11 15:54 Bit Mapping operation Najm Hashmi <najm@flipr.com>
2001-06-12 19:38 ` Oleg Bartunov <oleg@sai.msu.su>
2001-06-12 21:04 ` Philip Hallstrom <philip@adhesivemedia.com>
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