Re: Trapping errors from pl/perl (trigger) functions

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Wiebe Cazemier <halfgaar(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trapping errors from pl/perl (trigger) functions
Date: 2007-07-01 19:16:16
Message-ID: 20070701191616.GA7956@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Todorov 2007-07-01 19:18:21 Re: [pgsql-general] In memory tables/databases
Previous Message Tom Lane 2007-07-01 18:52:20 Re: Is this a bug?