pl/python tracebacks

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема pl/python tracebacks
Дата
Msg-id 4D1354F3.2090701@wulczer.org
обсуждение исходный текст
Ответы Re: pl/python tracebacks  (Jan Urbański <wulczer@wulczer.org>)
Re: pl/python tracebacks  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Here's a patch implementing traceback support for PL/Python mentioned in
http://archives.postgresql.org/pgsql-hackers/2010-12/msg01991.php. It's
an incremental patch on top of the plpython-refactor patch sent eariler.

Git branch for this patch:
https://github.com/wulczer/postgres/tree/tracebacks.

It's a variant of
http://archives.postgresql.org/pgsql-patches/2006-02/msg00288.php with a
few more twists.

For errors originating from Python exceptions add the traceback as the
message detail. The patch tries to mimick Python's traceback.py module
behaviour as close as possible, icluding interleaving stack frames with
source code lines in the detail message. Any Python developer should
instantly recognize these kind of error reporting, it looks almost the
same as an error in the interactive Python shell.

A future optimisation might be not splitting the procedure source each
time a traceback is generated, but for now it's probably not the most
important scenario to optimise for.

Cheers,
Jan

Вложения

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

Предыдущее
От: Jan Urbański
Дата:
Сообщение: pl/python invalidate functions with composite arguments
Следующее
От: Jan Urbański
Дата:
Сообщение: pl/python table functions