Re: Error handling in plperl and pltcl

From: Mike Rylander <mrylander(at)gmail(dot)com>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: Richard Huxton <dev(at)archonet(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, James William Pye <flaw(at)rhid(dot)com>, Jan Wieck <janwieck(at)yahoo(dot)com>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Error handling in plperl and pltcl
Date: 2004-12-01 11:46:39
Message-ID: b918cf3d04120103462f40d696@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 01 Dec 2004 10:29:17 +0100, Thomas Hallgren
<thhal(at)mailblocks(dot)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(at)gmail(dot)com
GPLS -- PINES Development
Database Developer
http://open-ils.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-12-01 14:08:11 Please release (was Re: nodeAgg perf tweak)
Previous Message Simon Riggs 2004-12-01 10:03:40 Re: nodeAgg perf tweak