pl/python tracebacks
| От | Jan Urbański |
|---|---|
| Тема | pl/python tracebacks |
| Дата | |
| Msg-id | 4D1354F3.2090701@wulczer.org обсуждение исходный текст |
| Ответы |
Re: pl/python tracebacks
Re: pl/python tracebacks |
| Список | 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 по дате отправления: