Re: [HACKERS] Access Error Details from PL/pgSQL

2012-02-21 Thread Pavel Stehule
Hello 2012/2/21 aasat : > I have question. GET STACKED DIAGNOSTICS work only in exception block? is it > posible to use it in separate function called in exception block? > Stacked diagnostick will be in 9.2 and it is allowed only in exception block. Regards Pavel Stehule > > EXCEPTION >  WHEN

Re: [HACKERS] Access Error Details from PL/pgSQL

2012-02-21 Thread aasat
I have question. GET STACKED DIAGNOSTICS work only in exception block? is it posible to use it in separate function called in exception block? EXCEPTION WHEN others THEN peform log_error(); END; CREATE OR REPLACE FUNCTION log_error() RETURNS boolean AS $BODY$ declare v_state TEXT;

Re: [HACKERS] Access Error Details from PL/pgSQL

2012-02-13 Thread David E. Wheeler
On Feb 13, 2012, at 9:30 AM, Pavel Stehule wrote: > no in stable > > http://www.depesz.com/2011/07/20/waiting-for-9-2-stacked-diagnostics-in-plpgsql/ Ah, great, I had forgotten about that. Thank you, David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes

Re: [HACKERS] Access Error Details from PL/pgSQL

2012-02-13 Thread Pavel Stehule
Hello 2012/2/13 David E. Wheeler : > Hackers, > > In PL/pgSQL exception handling, I'm able to access the error code (SQLSTATE) > and error message (SQLERRM). Is there any way to get at error details (yet)? > If not, could SQLDETAIL or some such be added? > no in stable http://www.depesz.com/20