Re: proposal: plpgsql - Assert statement

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Marko Tiikkaja <marko(at)joh(dot)to>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: plpgsql - Assert statement
Date: 2015-01-21 22:28:35
Message-ID: 54C02813.9020607@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/21/15 3:10 PM, Pavel Stehule wrote:
>
> is there some agreement on this behave of ASSERT statement?
>
> I would to assign last patch to next commitfest.
>
> Possible changes:
>
> * I would to simplify a behave of evaluating of message expression - probably I disallow NULL there.

Well, the only thing I could see you doing there is throwing a different error if the hint is null. I don't see that as an improvement. I'd just leave it as-is.

> * GUC enable_asserts will be supported

That would be good. Would that allow for enabling/disabling on a per-function basis too?

> * a assert exception should not be handled by PLpgSQL handler -- like CANCEL exception

+1
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-01-21 22:33:40 Re: B-Tree support function number 3 (strxfrm() optimization)
Previous Message Peter Geoghegan 2015-01-21 22:11:20 Re: B-Tree support function number 3 (strxfrm() optimization)