Re: [COMMITTERS] pgsql: Allow PL/python to return - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: [COMMITTERS] pgsql: Allow PL/python to return
Date
Msg-id 1157214616.3799.20.camel@localhost.localdomain
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Allow PL/python to return  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Ühel kenal päeval, L, 2006-09-02 kell 11:20, kirjutas Tom Lane:
> Hannu Krosing <hannu@skype.net> writes:
> > Do you have anyone specific in mind who should also do the review ?
> 
> I went through the commit log for plpython.c to see who'd be a likely
> prospect, and was dismayed to realize that basically no one has done
> any serious work on it since the original author disappeared about four
> years back :-(.  There are a whole lot of commits that are
> search-and-replace by-blow from unrelated backend changes, and a couple
> of people have fixed isolated bugs, but I'm not sure we have anyone who
> would claim to understand the module as a whole.  Scary.
> 
> I guess what I'm wishing for is someone to adopt ownership of plpython
> and invest the effort to get up to speed on the whole thing. 

I think/hope we (Skype) gave that task to Sven Suursoho, at least for a
few years from now. But it would really be good, if we had at least 2
people who could review each others code.

> It's
> certainly well behind the curve on such things as support of IN/OUT
> parameters.  (I was about to say named parameters as well, but on second
> look it looks like this commit just did something about that.)

Yes, named params should be supported now.

Well, I guess Sven could take a look at IN/OUT params as well and see
what can be done.

I also have got some complaints about plpython not being able to accept
records as  input parameters. 

And IIRC there were some issues with returning BYTEA type thanks to
python producing hex representation for unprintable chars and postgresql
expecting octal, and requiring dual escaping for \0 and \\. I then
resolved it with a special python class Bytea() with its onn __str__ and
__repr__ methods, but it would be better if language handler could do it
directly.

> Anyway, I can't say whether or not there's anything wrong with this
> patch --- it may well be just fine.  What's bugging me is that we don't
> seem to have any way to find out except wait for bug reports.

We are actually using it (or rather backport to 8.0/8.1) on our test
machines without seeing any bugs for some time already, even before the
NULL-return checking went in.

Otoh, we are not specifically looking for bugs on plpython there, but
rather if our own code runs without errors.

-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com




pgsql-hackers by date:

Previous
From: Lukas Kahwe Smith
Date:
Subject: Re: Getting a move on for 8.2 beta
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add new variable "server_version_num", which is almost the same