Re: Fixed length data types issue

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixed length data types issue
Date: 2006-09-15 10:07:43
Message-ID: 20060915100743.GE1608@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 15, 2006 at 10:01:19AM +0100, Heikki Linnakangas wrote:
> Gregory Stark wrote:
> >It's limited but I wouldn't say it's very limiting. In the cases where it
> >doesn't apply there's no way out anyways. A UTF8 field will need a length
> >header in some form.
>
> Actually, you can determine the length of a UTF-8 encoded character by
> looking at the most significant bits of the first byte. So we could
> store a UTF-8 encoded CHAR(1) field without any additional length header.

Except in postgres the length of a datum is currently only determined
from the type, or from a standard varlena header. Going down the road
of having to call type specific length functions for the values in
columns 1 to n-1 just to read column n seems like a really bad idea.

We want to make access to later columns *faster* not slower, which
means keeping to the simplest (code-wise) scheme possible.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew - Supernews 2006-09-15 10:17:55 Re: New version of money type
Previous Message Ragnar 2006-09-15 10:07:05 Re: [HACKERS] lower() not working correctly...?