Fix PL/Python traceback for error in separate file

Peter Eisentraut <peter_e@gmx.net>

Commit: 395fcac29906d22615ba68bd1dfa31daf691979e
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2011-04-20T20:19:04Z
Releases: 9.1.0
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

Files

PathChange+/−
src/pl/plpython/plpython.c modified +22 −2