Re: Assertions in PL/PgSQL

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assertions in PL/PgSQL
Date: 2013-09-19 12:24:30
Message-ID: 523AECFE.50206@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2013-09-19 12:28:31 Re: Assertions in PL/PgSQL
Previous Message Pavel Stehule 2013-09-19 12:08:07 Re: Assertions in PL/PgSQL