From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | no error context for index updates? |
Date: | 2012-01-31 18:17:25 |
Message-ID: | 1328033845.6603.10.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Attached is a test case reduced from a real application. There is a
table with an index on a function written in PL/Python. There is a
second PL/Python function that executes an INSERT into the table,
causing an index update. If the function used by the index fails, we
get an error message with context information, e.g.,
ERROR: spiexceptions.InternalError: plpy.Error: boom
CONTEXT: Traceback (most recent call last):
PL/Python function "test2", line 3, in <module>
rv = plpy.execute(plan, [a, b])
PL/Python function "test2"
I had been debugging the heck out of this function trying to figure out
where that particular exception is coming from, but it wasn't happening
on that function at all.
What I'd like to see if additional context like this:
CONTEXT: index updates of table "test"
CONTEXT: ....
PL/Python function "test1"
The second test case I'm attaching shows that the same thing happens
with PL/Perl, so it's not a problem of a particular PL.
Any ideas whether we could make this happen?
Attachment | Content-Type | Size |
---|---|---|
no-error-context-for-indexes1.sql | text/x-sql | 573 bytes |
no-error-context-for-indexes2.sql | text/x-sql | 587 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Abhijit Menon-Sen | 2012-01-31 18:29:59 | Re: JSON for PG 9.2 |
Previous Message | Josh Berkus | 2012-01-31 18:15:27 | Re: JSON for PG 9.2 |