Re: [HACKERS] SQLERRD and dump of variables

2011-04-29 Thread Joel Jacobson
2011/4/28 Noah Misch > In the mean time, have you considered doing something like this instead? > > EXCEPTION WHEN deadlock_detected >RAISE NOTICE '% var_foo % var_bar', var_foo, var_bar; >RAISE; > > The information isn't as nicely aggregated, but you don't lose any details. > Th

Re: [HACKERS] SQLERRD and dump of variables

2011-04-28 Thread Noah Misch
Joel, On Mon, Apr 25, 2011 at 07:45:13PM +0200, Joel Jacobson wrote: > (1) Make the detailed error message available in SPs and not only the short > error message (SQLERRM) Agreed. Really, all the information available via PQresultErrorField should also be exposed in PL error handling facilities

Re: [HACKERS] SQLERRD and dump of variables

2011-04-25 Thread Pavel Stehule
Hello 2011/4/25 Joel Jacobson : > I have two separate ideas, but they are kind of connected, > > (1) Make the detailed error message available in SPs and not only the short > error message (SQLERRM) > When debugging errors in stored procedures, I often add an exception handler > and print the valu

[HACKERS] SQLERRD and dump of variables

2011-04-25 Thread Joel Jacobson
I have two separate ideas, but they are kind of connected, (1) Make the detailed error message available in SPs and not only the short error message (SQLERRM) When debugging errors in stored procedures, I often add an exception handler and print the values of declared variables to the log. Unfo