specifics about BIT(n) types

From: Dennis Gearon <gearond(at)fireserve(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: specifics about BIT(n) types
Date: 2004-04-13 04:34:35
Message-ID: 407B6DDB.2080404@fireserve.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

please CC me as I'm on silent or digest.
--------------------------------------------------
I know these questions have been asked, and once by me. I can't find it
in the archives or in the documentation.

1/ Are the bits in BIT(n) types stored as 1 bit per '0/1' or as one BYTE
per '0/1' ?
2/ What is the RANGE of the number of bits storable?
3/ What kind of speed comparisons are there between using BIT(n) tyeps
and using multiple columns of INT4/8 values?

For example:

SELECT bit_varying_128_A & bit_varying_128_B FROM some_table;
vs
SELECT int8_A & int8_B & int8_C & int8_C FROM some_other_table;

I sure would love to see the answers to these questions put in the
BIT(n) section of the USER MANUAL, section 5.9.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tumurbaatar S. 2004-04-13 07:40:30 Executing script file
Previous Message Greg Stark 2004-04-13 03:00:49 Re: REINDEX slow?