From: | Sushant Sinha <sushant354(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | PL/Python: No stack trace for an exception |
Date: | 2011-07-21 13:27:57 |
Message-ID: | 1311254877.2302.4.camel@dragflick |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 (most recent call last):
File "valid.py", line 215, in <module>
parse_query(result['forminput'])
File "valid.py", line 132, in parse_query
dateobj = datestr_to_obj(columnHash[column])
File "valid.py", line 37, in datestr_to_obj
dateobj = datetime.date(words[2], words[1], words[0])
TypeError: an integer is required
Is this a known problem or this needs addressing?
Thanks,
Sushant.
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Urbański | 2011-07-21 13:31:33 | Re: PL/Python: No stack trace for an exception |
Previous Message | Robert Haas | 2011-07-21 13:03:21 | Re: [v9.1] sepgsql - userspace access vector cache |