pgsql: Fix PL/Python traceback for error in separate file

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix PL/Python traceback for error in separate file
Date: 2011-04-20 20:23:35
Message-ID: E1QCdvz-0005FD-VC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/395fcac29906d22615ba68bd1dfa31daf691979e

Modified Files
--------------
src/pl/plpython/plpython.c | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Hiroshi Inoue 2011-04-20 21:39:42 Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name
Previous Message Tom Lane 2011-04-20 13:38:27 Re: Re: [COMMITTERS] pgsql: setlocale() on Windows doesn't work correctly if the locale name