Re: plpgsql exception handling - Mailing list pgsql-sql

From Uwe Bartels
Subject Re: plpgsql exception handling
Date
Msg-id AANLkTimhffg2cNb9gqU8X2Q6GupRKKEtEkPK6i3h2AUp@mail.gmail.com
Whole thread Raw
In response to Re: plpgsql exception handling  (Samuel Gendler <sgendler@ideasculptor.com>)
Responses Re: plpgsql exception handling  (Samuel Gendler <sgendler@ideasculptor.com>)
Re: plpgsql exception handling  (Uwe Bartels <uwe.bartels@gmail.com>)
List pgsql-sql
same same.
all errors including syntax_error match to others, but I checked it again. and the exception remains.

Uwe



On 10 March 2011 10:56, Samuel Gendler <sgendler@ideasculptor.com> wrote:


On Thu, Mar 10, 2011 at 12:45 AM, Uwe Bartels <uwe.bartels@gmail.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?'
 


pgsql-sql by date:

Previous
From: Samuel Gendler
Date:
Subject: Re: plpgsql exception handling
Next
From: Samuel Gendler
Date:
Subject: Re: plpgsql exception handling