Boolean and Bit

Started by Keith Grayalmost 25 years ago2 messages
#1Keith Gray
keith@heart.com.au

Hello All,

This is my first post (so be gentle with me)...

Is there a searchable archive?

I would like suggestions and examples of adding SQL-92
data type BIT compatibility to a PostgreSQL schema.

From the doc's I gather you can "CREATE TYPE bit"
with storage int or int4... but I don't know
about the input/output for zero and one.

Should SQL (ODBC) be able to ask "WHERE bitfield;"
or should it ask "WHERE bitfield = 1;" ?

Any response gratefully recognized...

Keith

#2Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Keith Gray (#1)
Re: Boolean and Bit

I would like suggestions and examples of adding SQL-92
data type BIT compatibility to a PostgreSQL schema.

You will probably do best by looking at the 7.1beta and the bit types
implemented there. They probably form a good starting point if they do
not do everything you need already.

Good luck!

- Thomas