pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sascha Schumann <sas@schell.de>
To: pgsql-sql@postgresql.org
Subject: int/bit fields
Date: Sun, 2 Aug 1998 17:26:01 +0200 (MET DST)
Message-ID: <Pine.LNX.4.00.9808021714520.2949-100000@guerilla.foo.bar> (raw)

Hi all,

we are in the progress of converting a flat ascii database to Postgres. In
the old database we used some int's to store bit fields which could be
easily used after parsing and converting them to numbers.

So, I need for example sth like this:

     SELECT * FROM mytable WHERE (statusbits & 8) <> 0

I had a quick look at the backend/utils/adt source directory, but didn't
found a function which provides such services. Where has the logic gone?

Any help appreciated.


         Sascha Schumann




Message-ID: <Pine.LNX.4.00.9808021714520.2949-100000@guerilla.foo.bar>
Permalink:  ../Pine.LNX.4.00.9808021714520.2949-100000@guerilla.foo.bar/
Also on:    postgresql.org/message-id/Pine.LNX.4.00.9808021714520.2949-100000@guerilla.foo.bar

 · 

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-sql@postgresql.org
  Cc: sas@schell.de
  Subject: Re: int/bit fields
  In-Reply-To: <Pine.LNX.4.00.9808021714520.2949-100000@guerilla.foo.bar>
  References: <Pine.LNX.4.00.9808021714520.2949-100000@guerilla.foo.bar>

* 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