Re: Trapping errors from pl/perl (trigger) functions - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Trapping errors from pl/perl (trigger) functions
Date
Msg-id 20070701191616.GA7956@winnie.fuhr.org
Whole thread Raw
In response to Trapping errors from pl/perl (trigger) functions  (Wiebe Cazemier <halfgaar@gmx.net>)
List pgsql-general
On Sat, Jun 30, 2007 at 10:30:32PM +0200, Wiebe Cazemier wrote:
> I have a pl/perl trigger function which can give an error, and I would like to
> catch it in a pl/pgsql function, but I can't seem to trap it.

What have you tried and how did the outcome differ from your
expectations?

> Is it possible to catch errors generated pl/perl functions in a BEGIN ...
> EXCEPTION WHEN ... END block? Or perhaps in some other way?

You could use "WHEN internal_error" or "WHEN others".  If that
doesn't work then please post a simple but complete example that
shows what you're trying to do.

--
Michael Fuhr

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is this a bug?
Next
From: "Alexander Todorov"
Date:
Subject: Re: [pgsql-general] In memory tables/databases