Re: Memory context in exception handler - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Memory context in exception handler
Date
Msg-id 200701142205.43063.peter_e@gmx.net
Whole thread Raw
In response to Re: Memory context in exception handler  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> As near as I can tell, you're using CopyErrorData not because you
> need an actual copy but just because elog.c doesn't export any other
> API to let you see the current sqlerrorcode.  Perhaps adding a
> function to return the top stack entry's sqlerrorcode would be a
> better API change?

Yes, something like that would be good to have.  At the moment, there 
are not a lot of users of this mechanism in our code, so I'm not in a 
hurry to change this (and I think that I want to rewrite the XML 
parsing code to do without the exceptions dance).

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Autovacuum improvements
Next
From: Neil Conway
Date:
Subject: Re: -f option for pg_dumpall