Re: Reducing data type space usage - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Reducing data type space usage
Date
Msg-id 200609152323.k8FNNPu29485@momjian.us
Whole thread Raw
In response to Re: Reducing data type space usage  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Reducing data type space usage  (Gregory Stark <stark@enterprisedb.com>)
Re: Reducing data type space usage  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Tom Lane wrote:
> >> No, it'll be a 1-byte header with length indicating that no bytes
> >> follow,
> 
> > Well, in my idea, 10000001 would be 0x01.  I was going to use the
> > remaining 7 bits for the 7-bit ascii value.
> 
> Huh?  I thought you said 00000001 would be 0x01, that is, high bit
> clear means a single byte containing an ASCII character.  You could
> reverse that but it just seems to make things harder --- the byte
> isn't a correct data byte by itself, as it would be with the other
> convention.

Oh, OK, I had high byte meaning no header, but clear is better, so
00000001 is 0x01, and 00000000 is "".  But I see now that bytea does
store nulls, so yea, we would be better using 10000001, and it is the
same size as 00000000.

--  Bruce Momjian   bruce@momjian.us EnterpriseDB    http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Reducing data type space usage
Next
From: Gregory Stark
Date:
Subject: Re: Reducing data type space usage