Re: Error handling in plperl and pltcl - Mailing list pgsql-hackers

From Mike Rylander
Subject Re: Error handling in plperl and pltcl
Date
Msg-id b918cf3d04120103462f40d696@mail.gmail.com
Whole thread Raw
In response to Re: Error handling in plperl and pltcl  (Thomas Hallgren <thhal@mailblocks.com>)
List pgsql-hackers
On Wed, 01 Dec 2004 10:29:17 +0100, Thomas Hallgren
<thhal@mailblocks.com> wrote:
> Richard Huxton wrote:
> 
> > But is the problem not that forgetting to use SAVEPOINT can get us in
> > trouble with clearing up after an exception?
> 
> I fail to see how that's different from forgetting to use pgtry instead
> of try.

I see that as a non-starter.  At least in the case of perl, we can
actually hide pgeval behind the standard eval.  If pgeval were
equivelant to, say, 'savepoint("foo"); CORE::eval @_;' then the onus
is still on the developer to use 'eval', but that is a familiar
concept to defensive developers.

-- 
Mike Rylander
mrylander@gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: nodeAgg perf tweak
Next
From: Alvaro Herrera
Date:
Subject: Please release (was Re: nodeAgg perf tweak)