Re: Assertions in PL/PgSQL - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Assertions in PL/PgSQL
Date
Msg-id 523AECFE.50206@joh.to
Whole thread Raw
In response to Re: Assertions in PL/PgSQL  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 9/18/13 5:11 PM, Pavel Stehule wrote:
> In this code a assert fail can be lost in app log. Or can be knowingly
> handled and ignored - what is wrong, and should not be allowed.
>
> When I wrote a little bit complex procedures, I had to use a EXCEPTION WHEN
> OTHERS clause - because I would not to lost a transaction. It worked, but
> searching a syntax errors was significantly harder - so on base of this
> experience I am thinking so some errors can be handled (related to database
> usage) and others not - like syntax errors in PL/pgSQL or possible
> assertions (although we can handle syntax error, but I don't think so it is
> practical). It significantly increase a work that is necessary for error
> identification.

I think that's a fair point.



Regards,
Marko Tiikkaja




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Assertions in PL/PgSQL
Next
From: Marko Tiikkaja
Date:
Subject: Re: Assertions in PL/PgSQL