int/bit fields - Mailing list pgsql-sql

From Sascha Schumann
Subject int/bit fields
Date
Msg-id Pine.LNX.4.00.9808021714520.2949-100000@guerilla.foo.bar
Whole thread Raw
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: date versus datetime?
Next
From: David Rugge
Date:
Subject: Converting a Sybase SQL script to a PostgreSQL script