Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Farina <daniel(at)heroku(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables)
Date: 2013-03-20 14:43:57
Message-ID: 2529.1363790637@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Farina <daniel(at)heroku(dot)com> writes:
> Okay, one more of those fridge-logic bugs. Sorry for the noise. v5.

> A missing PG_RETHROW to get the properly finally-esque semantics:

> --- a/contrib/dblink/dblink.c
> +++ b/contrib/dblink/dblink.c
> @@ -642,7 +642,10 @@ dblink_fetch(PG_FUNCTION_ARGS)
> }
> PG_CATCH();
> {
> + /* Pop any set GUCs, if necessary */
> restoreLocalGucs(&rgs);
> +
> + PG_RE_THROW();
> }
> PG_END_TRY();

Um ... you shouldn't need a PG_TRY for that at all. guc.c will take
care of popping the values on transaction abort --- that's really rather
the whole point of having that mechanism.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-03-20 15:33:54 Re: Problem with background worker
Previous Message Marc Cousin 2013-03-20 14:38:36 Problem with background worker