Re: exceptions not present in plpy with Python 3

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: exceptions not present in plpy with Python 3
Дата
Msg-id 1295555404.27153.1.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на exceptions not present in plpy with Python 3  (Jan Urbański <wulczer@wulczer.org>)
Ответы Re: exceptions not present in plpy with Python 3  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On lör, 2010-12-18 at 18:56 +0100, Jan Urbański wrote:
> there seems to be a problem in the way we add exceptions to the plpy
> module in PL/Python compiled with Python 3k.
> 
> Try this: DO $$ plpy.SPIError $$ language plpython3u;
> 
> I'm not a Python 3 expert, but I nicked some code from the Internet and
> came up with this patch (passes regression tests on both Python 2 and 3).

It looks like the PyModule_AddObject() approach also works in Python 2.
Anyone see an issue with using that uniformly?




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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: pg_basebackup for streaming base backups
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: SSI patch version 13