Re: [PATCH] plpythonu datatype conversion improvements - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] plpythonu datatype conversion improvements
Date
Msg-id 8621.1250949802@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] plpythonu datatype conversion improvements  (Greg Stark <gsstark@mit.edu>)
Responses Re: [PATCH] plpythonu datatype conversion improvements  (Caleb Welton <cwelton@greenplum.com>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> On Sat, Aug 22, 2009 at 11:45 AM, Caleb Welton<cwelton@greenplum.com> wrote:
>> As documented in the patch, the primary motivation was support of BYTEA
>> datatype, which when cast through cstring was truncating python strings with
>> embedded nulls,
>> performance was only a secondary consideration.

> The alternative to attaching to the internal representation would be
> to marshal and unmarshal the text representation where nuls are
> escaped as \000.

I don't actually have a problem with depending on the internal
representation of bytea.  What I'm unhappy about is that (despite
Caleb's assertions that this is only about bytea) the patch proceeds
to make plpython intimate with the internal representation of a bunch
of *other* datatypes, some of which we have good reason to think may
change in future.  If it were only touching bytea I would not have
complained.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SIGUSR1 pingpong between master na autovacum launcher causes crash
Next
From: Tom Lane
Date:
Subject: Re: Index-only quals