Re: alternative to PG_CATCH - Mailing list pgsql-hackers

From Robert Haas
Subject Re: alternative to PG_CATCH
Date
Msg-id CA+TgmobXZv0mtTgyM0ivd1tiURuEefy0v2g25Owv8Vi3xJBGtg@mail.gmail.com
Whole thread Raw
In response to Re: alternative to PG_CATCH  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: alternative to PG_CATCH
List pgsql-hackers
On Mon, Oct 28, 2019 at 4:43 AM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> Here is a new implementation that works just like that.

This looks like a marked notational improvement.

With the patch:

[rhaas pgsql]$ git grep PG_CATCH | wc -l
     102
[rhaas pgsql]$ git grep PG_FINALLY | wc -l
      55

I'm actually a bit surprised that the percentage of cases that could
be converted to use PG_FINALLY wasn't even higher than that.

In theory, the do_rethrow variable could conflict with a symbol
declared in the surrounding scope, but that doesn't seem like it's a
problem worth getting worked up about.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Next
From: Surafel Temesgen
Date:
Subject: Re: WIP: System Versioned Temporal Table