Re: plpgsql error handling bug

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Ivan-Sun1(at)mail(dot)ru
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: plpgsql error handling bug
Date: 2004-09-05 17:18:33
Message-ID: 20040905101205.F29858@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Sun, 5 Sep 2004 Ivan-Sun1(at)mail(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-09-05 17:23:12 Re: plpgsql error handling bug
Previous Message Tom Lane 2004-09-05 16:44:33 Re: readline selection (was Re: [GENERAL] psql leaking? - SOLVED)