pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ericson Smith <ericson@did-it.com>
To: pgsql-admin@postgresql.org
Subject: Bit string manipulation in Postgresql
Date: 29 Oct 2002 20:01:26 -0500
Message-ID: <1035939687.26937.7.camel@linux> (raw)

Hi all,

I'm trying to code a problem where a set of options can be expressed in
a data column like "10111011", a bit string. 

Each position is atomic and represents a certain setting within the set,
thus: "00100000" would return TRUE if OR'd with "10111011", since the
3'rd position matches in both sets.

While I could manually retrieve N records and iterate through them in
whatever programming language (or possibly a plpgsql function), is there
a way I could natively do this in a WHERE clause in my query? 

Looking through the idocs, I could not immediately find a way around
this issue. Any pointers to documentation (or perhaps another way to
implement this issue) would be very helpful.

Regards
Ericson Smith
eric@did-it.com






view thread (2+ messages)  latest in thread

Message-ID: <1035939687.26937.7.camel@linux>
Permalink:  ../1035939687.26937.7.camel@linux/
Also on:    postgresql.org/message-id/1035939687.26937.7.camel@linux

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: ericson@did-it.com
  Subject: Re: Bit string manipulation in Postgresql
  In-Reply-To: <1035939687.26937.7.camel@linux>
  References: <1035939687.26937.7.camel@linux>

* 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