Re: Error handling in plperl and pltcl

From: James William Pye <flaw(at)rhid(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Error handling in plperl and pltcl
Date: 2004-11-22 17:21:25
Message-ID: 1101144085.32981.53.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2004-11-20 at 16:39 -0500, Tom Lane wrote:
> You're right. You can *not* expose those as user-callable operations in
> a PL language. Consider for example what will happen if the user tries
> to roll back to a savepoint that was established outside your function
> call, or tries to exit the function while still inside a local
> savepoint. You have to enforce strict nesting of functions and
> subtransactions; therefore it's a lot easier to present an API that
> looks like an exception-block construct (per plpgsql), or that just
> hides the whole deal in the SPI calling interface (as I'm proposing for
> plperl/pltcl).

Hrm, what about a savepoint scoping facility that would be wrapped
around calls to [volatile?] functions to explicitly enforce these
regulations?

[...Poking around the archives a bit...]

[Or do I mean savepoint levels?]:
http://archives.postgresql.org/pgsql-hackers/2004-07/msg00505.php
http://archives.postgresql.org/pgsql-hackers/2004-09/msg00569.php

--
Regards,
James William Pye

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matt 2004-11-22 17:31:15 Re: patch: plpgsql - access records with rec.(expr)
Previous Message David Fetter 2004-11-22 17:14:17 Re: Beta5 now Available