Re: [PATCH] plpythonu datatype conversion improvements

From: Caleb Welton <cwelton(at)greenplum(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] plpythonu datatype conversion improvements
Date: 2009-08-22 10:45:24
Message-ID: C6B51A54.2F9D%cwelton@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Regards,
Caleb

(Sorry for my slow entry on this thread, I'm on vacation right now.)

On 8/17/09 8:12 AM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> For the record, I think this entire patch is a bad idea. PLs should not
>> be so much in bed with the internal representation of datatypes.

> I thought there was some suggestion in the past that we should move some
> in that direction.

There's been some discussion about functional improvements like
translating arrays to arrays. I don't know what we'd have to do
to manage that, but possibly some API extensions to the array code
would make it feasible without violating abstractions. The present
patch, however, doesn't appear to have any reason to live other than an
undocumented amount of performance improvement. My feeling about that
is if you're concerned about micro-performance, why are you coding in
python to begin with? It isn't the best choice out there.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Cave-Ayland 2009-08-22 11:14:48 Re: Another try at reducing repeated detoast work for PostGIS
Previous Message Zdenek Kotala 2009-08-22 09:30:45 Re: SIGUSR1 pingpong between master na autovacum launcher causes crash