Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet
Date
Msg-id 87ir0ivflh.fsf@oxford.xeocode.com
Whole thread Raw
In response to VARATT_EXTERNAL_GET_POINTER is not quite there yet  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: VARATT_EXTERNAL_GET_POINTER is not quite there yet  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> After much experimentation I was able to get it to work by invoking
> memcpy through a function pointer, which seems to be sufficient to
> disable this particular compiler's built-in intelligence about memcpy.
> I can't say that I find this a nice clean solution; but does anyone have
> a better one?

I'm thinking instead of having struct varlena (which you're not allowed to
safely use any members of anyways) we should just have a typedef to void*.

That would make things like DATUM_GET_TEXT_PP slightly more sane as well.
text* would just be a typedef to void* which could be passed to VARDATA_ANY
and VARDATA_ANY_EXHDR but not manipulated directly.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about
EnterpriseDB'sPostgreSQL training!
 


pgsql-hackers by date:

Previous
From: "Gevik Babakhani"
Date:
Subject: Re: Which MemoryContext?
Next
From: Magnus Hagander
Date:
Subject: Re: Permanent settings