Re: storage size of "bit" data type.. - Mailing list pgsql-general

From Decibel!
Subject Re: storage size of "bit" data type..
Date
Msg-id 6D69367B-D029-4E58-AF8F-13EF7B59F427@decibel.org
Whole thread Raw
In response to storage size of "bit" data type..  (Alex Mayrhofer <axelm@nona.net>)
List pgsql-general
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 display precision.
>
> Is it really necessary to store display precision when it can be
> taken from the table column definition?


Two problems...

1) CREATE TABLE n(n numeric);

2) The knowledge of extra type information (ie: the numbers in char()
or numeric()) don't extend deeply enough into the code. This is part
of why char() uses the exact same storage mechanism as varchar().
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



Attachment

pgsql-general by date:

Previous
From: "Chris Velevitch"
Date:
Subject: Re: Understanding how partial indexes work?
Next
From: Decibel!
Date:
Subject: Re: storage size of "bit" data type..