Re: [PATCH] plpythonu datatype conversion improvements

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCH] plpythonu datatype conversion improvements
Дата
Msg-id 1250379860.18992.13.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на [PATCH] plpythonu datatype conversion improvements  (Caleb Welton <cwelton@greenplum.com>)
Ответы Re: [PATCH] plpythonu datatype conversion improvements  (Pierre Frédéric Caillaud<lists@peufeu.com>)
Re: [PATCH] plpythonu datatype conversion improvements  (James Pye <lists@jwp.name>)
Re: [PATCH] plpythonu datatype conversion improvements  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [PATCH] plpythonu datatype conversion improvements  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: [PATCH] plpythonu datatype conversion improvements  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On tis, 2009-05-26 at 16:07 -0700, Caleb Welton wrote:
> Patch for plpythonu
>
> Primary motivation of the attached patch is to support handling bytea
> conversion allowing for embedded nulls, which in turn allows for
> supporting the marshal module.
>
> Secondary motivation is slightly improved performance for conversion
> routines of basic datatypes that have simple mappings between
> postgres/python.
>
> Primary design is to change the conversion routines from being based
> on cstrings to datums, eg:
>     PLyBool_FromString(const char *)  =>
> PLyBool_FromBool(PLyDatumToOb, Datum);

I have reworked this patch a bit and extended the plpython test suite
around it.  Current copy attached.

The remaining problem is that the patch loses domain checking on the
return types, because some paths no longer go through the data type's
input function.  I have marked these places as FIXME, and the regression
tests also contain a failing test case for this.

What's needed here, I think, is an API that takes a datum plus type
information and checks whether the datum is valid within the domain.  I
haven't found one that is exported, but maybe someone could give a tip.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Remove tabs from SGML.
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Remove tabs from SGML.