Re: [GENERAL] storage size of "bit" data type..

2008-03-17 Thread Bruce Momjian
Added to TODO: * Reduce BIT data type overhead using short varlena headers http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php --- Decibel! wrote: > On Dec 5, 2007, at 7:23 PM, Michael Glaesemann wrote: >

Re: [GENERAL] storage size of "bit" data type..

2007-12-07 Thread Vyacheslav Kalinin
> It needs to store the number of bits present as well Couldn't that be reduced to 1 byte that'd say how many bits count in the last byte? > Only in the sense that numeric also has to store some meta data as well like the weight and display precision. Is it really necessary to store display prec

Re: [GENERAL] storage size of "bit" data type..

2007-12-06 Thread Decibel!
On Dec 6, 2007, at 5:10 PM, Gregory Stark wrote: It needs to store the number of bits present as well. Otherwise it wouldn't be able to tell apart B'1' and B'01' ... B'0001' ... Only in the sense that numeric also has to store some meta data as well like the weight and display precision

Re: [GENERAL] storage size of "bit" data type..

2007-12-06 Thread Decibel!
On Dec 6, 2007, at 5:19 PM, Vyacheslav Kalinin wrote: > It needs to store the number of bits present as well Couldn't that be reduced to 1 byte that'd say how many bits count in the last byte? > Only in the sense that numeric also has to store some meta data as well like the weight and di

Re: [GENERAL] storage size of "bit" data type..

2007-12-06 Thread Gregory Stark
"Decibel!" <[EMAIL PROTECTED]> writes: > On Dec 5, 2007, at 7:23 PM, Michael Glaesemann wrote: >> On Dec 5, 2007, at 14:19 , Alex Mayrhofer wrote: >>> i'm trying to find out the storage size for bit(n) data. My initial >>> assumption would be that for any 8 bits, one byte of storage is required.

Re: [GENERAL] storage size of "bit" data type..

2007-12-06 Thread Decibel!
On Dec 5, 2007, at 7:23 PM, Michael Glaesemann wrote: On Dec 5, 2007, at 14:19 , Alex Mayrhofer wrote: i'm trying to find out the storage size for bit(n) data. My initial assumption would be that for any 8 bits, one byte of storage is required. select pg_column_size(B'1') as "1bit",

Re: [GENERAL] storage size of "bit" data type..

2007-12-05 Thread Michael Glaesemann
On Dec 5, 2007, at 14:19 , Alex Mayrhofer wrote: Hi, i'm trying to find out the storage size for bit(n) data. My initial assumption would be that for any 8 bits, one byte of storage is required. select pg_column_size(B'1') as "1bit", pg_column_size(B'') as "4bits", pg_c

[GENERAL] storage size of "bit" data type..

2007-12-05 Thread Alex Mayrhofer
Hi, i'm trying to find out the storage size for bit(n) data. My initial assumption would be that for any 8 bits, one byte of storage is required. Is this assumption correct? I didn't find that information in the online docs. thanks, Alex ---(end of broadcast)--