Re: Fixed length data types issue - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Fixed length data types issue
Date
Msg-id 87wt8awkxb.fsf@enterprisedb.com
Whole thread Raw
In response to Re: Fixed length data types issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Fixed length data types issue  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Fixed length data types issue  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

>> Also Heikki points out here that it would be nice to allow for the case for a
>> 0-byte header.
>
> I don't think there's enough code space for that; at least not compared
> to its use case.

Well it's irrelevant if we add a special data type to handle CHAR(1).

But if we don't it's pretty important. Even with 1-byte varlena headers you
can have approaching 100% bloat if you have a table with lots of CHAR(1)
fields.

That said I'm not sure whether it's worth it over having a special CHAR(1)
data type which would have the benefit of handling other 1-byte encodings
aside from ascii. We would probably still need a CHAR(2) data type too where
the overhead is still 50%.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Buildfarm vs. Linux Distro classification
Next
From: "Albe Laurenz"
Date:
Subject: Re: [PATCHES] Fix linking of OpenLDAP libraries