Re: PG_CATCH used without PG_RETHROW - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PG_CATCH used without PG_RETHROW
Date
Msg-id 31481.1441308876@sss.pgh.pa.us
Whole thread Raw
In response to PG_CATCH used without PG_RETHROW  (Greg Stark <stark@mit.edu>)
Responses Re: PG_CATCH used without PG_RETHROW  (正华吕 <kainwen@gmail.com>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> My understanding is that PG_TRY/PG_CATCH doesn't save enough state to
> avoid rethrowing errors and if you want to actually continue the
> transaction you must use a subtransaction. As a result I was under the
> impression it was mandatory to PG_RETHROW as a result.

> If that's the case then I think I just came across a bug in
> utils/adt/xml.c where there's no PG_RETHROW:

The reason we think that's OK is that we assume libxml2 does not call back
into the general backend code, so there is no PG state we'd have to undo.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_ctl/pg_rewind tests vs. slow AIX buildfarm members
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_ctl/pg_rewind tests vs. slow AIX buildfarm members