Re: PG_CATCH used without PG_RETHROW

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PG_CATCH used without PG_RETHROW
Date: 2015-09-03 19:34:36
Message-ID: 31481.1441308876@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <stark(at)mit(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-09-03 20:02:43 Re: pg_ctl/pg_rewind tests vs. slow AIX buildfarm members
Previous Message Tom Lane 2015-09-03 19:31:06 Re: pg_ctl/pg_rewind tests vs. slow AIX buildfarm members