]> granicus.if.org Git - postgresql/commit
Fix PL/Python traceback for error in separate file
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 20 Apr 2011 20:19:04 +0000 (23:19 +0300)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 20 Apr 2011 20:19:04 +0000 (23:19 +0300)
commit395fcac29906d22615ba68bd1dfa31daf691979e
tree69bddb61cc96cab13dec15dd99516293649ac727
parent0262251c337ca066d1b1698684784254849b5676
Fix PL/Python traceback for error in separate file

It assumed that the lineno from the traceback always refers to the
PL/Python function.  If you created a PL/Python function that imports
some code, runs it, and that code raises an exception, PLy_traceback
would get utterly confused.

Now we look at the file name reported with the traceback and only
print the source line if it came from the PL/Python function.

Jan UrbaƄski
src/pl/plpython/plpython.c