Re: [COMMITTERS] pgsql: Allow PL/python to return

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [COMMITTERS] pgsql: Allow PL/python to return
Дата
Msg-id 1157214616.3799.20.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Allow PL/python to return  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Lukas Kahwe Smith
Дата:
Сообщение: Re: Getting a move on for 8.2 beta
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add new variable "server_version_num", which is almost the same