Re: Bit string storage space?

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org
Subject: Re: Bit string storage space?
Date: 2003-02-21 06:57:48
Message-ID: 3E55CDEC.D1C44066@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

1 byte equals 8 bits in the bit string. Add 4 bytes minimum for the
'size_of' value for the field.

Example:

B'11011011010101101' 17 bits

(17 % 8) + 1 (round up) + 4 ( for size ) = 7 bytes to store 17 bits.
--

Carpe Dancem ;-)
-----------------------------------------------------------------
Remember your friends while they are alive
-----------------------------------------------------------------
Sincerely, Dennis Gearon

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2003-02-21 07:00:06 Re: continuous data from stdin
Previous Message Neil Conway 2003-02-21 06:52:40 Re: Authentication to run pg_dump automatically