Re: PL/Python: No stack trace for an exception

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: sushant354(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/Python: No stack trace for an exception
Date: 2011-07-21 13:31:33
Message-ID: 4E282A35.7010903@wulczer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21/07/11 15:27, Sushant Sinha wrote:
> I am using plpythonu on postgres 9.0.2. One of my python functions was
> throwing a TypeError exception. However, I only see the exception in the
> database and not the stack trace. It becomes difficult to debug if the
> stack trace is absent in Python.
>
> logdb=# select get_words(forminput) from fi;
> ERROR: PL/Python: TypeError: an integer is required
> CONTEXT: PL/Python function "get_words"
>
> And here is the error if I run that function on the same data in python:
>
> [traceback]
>
> Is this a known problem or this needs addressing?

Yes, traceback support in PL/Python has already been implemented and is
a new feature that will be available in PostgreSQL 9.1.

Cheers,
Jan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2011-07-21 13:34:34 Re: PL/Python: No stack trace for an exception
Previous Message Sushant Sinha 2011-07-21 13:27:57 PL/Python: No stack trace for an exception