On Thu, 2009-06-18 at 09:59 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > Why is bcTruelen being called so many *more* times?
>
> I think you have misunderstood the context.
err, no, I just misread the original text. Possibly a worse error :-?
> It would be way nicer if we could strip trailing blanks on storage,
> and then figure a way to either reconstitute them on output (problem
> here is the output function doesn't have access to typmod) or
> language-lawyer our way to deciding we don't have to.
Is there a spare bit on the varhdr that can be set by datatypes? It
would be useful to have a bit meaning "there is a typmod stored on this
Datum", that would allow the output function to do some special
processing.
I notice we lose on tuple access also. CHAR(n) is fixed length, but is
treated as variable length for offsets.
-- Simon Riggs www.2ndQuadrant.comPostgreSQL Training, Services and Support