Re: plpgsql error handling bug - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: plpgsql error handling bug
Date
Msg-id 20040905101205.F29858@megazone.bigpanda.com
Whole thread Raw
In response to plpgsql error handling bug  (Ivan-Sun1@mail.ru)
List pgsql-bugs
On Sun, 5 Sep 2004 Ivan-Sun1@mail.ru wrote:

> I found a bug in the behaviour of plpgsql error handling system
> while trying to handle foreign key violation exception.
>
> When this error occured, control doesn't jump to exception handling block.
> It moves to the next statement instead. When control leaves the
> function exception is occured. So it's impossible to handle this kind of
> exception.

IIRC that's because the check is not happening until after the function is
finished (at the end of the user sent statement). If so, then yes,
currently there'd be no way to handle the exception.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Permissions problem with sequences
Next
From: Tom Lane
Date:
Subject: Re: plpgsql error handling bug