Re: Variable length varlena headers redux - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Variable length varlena headers redux
Date
Msg-id 200702131701.l1DH16912560@momjian.us
Whole thread Raw
In response to Re: Variable length varlena headers redux  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark wrote:
> 
> "Bruce Momjian" <bruce@momjian.us> writes:
> 
> >> But I'm surprised, I had the impression that you were reluctant to consider
> >> memcpying all the data all the time.
> >
> > Uh, if the macros can read 1 and 4-byte headers, why do we need to
> > allocate memory for them?
> 
> Because the macros can't read 1 and 4-byte headers. If they could we would
> have the problem with VARDATA for code sites that write to the data before
> they write the size.

OK, so what if we always create 4-byte headers, and read both.

--  Bruce Momjian  <bruce@momjian.us>          http://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: Gregory Stark
Date:
Subject: Re: Variable length varlena headers redux
Next
From: Bruce Momjian
Date:
Subject: Re: TODO item: update source/timezone for 64-bit tz files