Re: Memory context in exception handler

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Memory context in exception handler
Date: 2007-01-14 21:05:42
Message-ID: 200701142205.43063.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2007-01-14 21:25:51 Re: -f <output file> option for pg_dumpall
Previous Message Tom Lane 2007-01-14 21:01:14 Re: Autovacuum improvements