Re: plpgsql exception handling

From: Samuel Gendler <sgendler(at)ideasculptor(dot)com>
To: Uwe Bartels <uwe(dot)bartels(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: plpgsql exception handling
Date: 2011-03-10 09:56:45
Message-ID: AANLkTikqDNhUKr6fhDDFb1+=pbtHpGsQoLwKtNR4D727@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Mar 10, 2011 at 12:45 AM, Uwe Bartels <uwe(dot)bartels(at)gmail(dot)com> wrote:

> Hi,
> Yes, of course is this sql producing an error.
> The point is, I want to trap the error and handle it. Here in this case I
> set the variable l_state and l_message.
>

Doh! Of course. Sorry about that. What happens when you explicitly catch
the 42601 sql state or the syntax_error condition instead of 'others?'

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Uwe Bartels 2011-03-10 10:53:55 Re: plpgsql exception handling
Previous Message Uwe Bartels 2011-03-10 08:45:45 Re: plpgsql exception handling