Re: proposal: plpgsql - Assert statement - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: proposal: plpgsql - Assert statement
Date
Msg-id 540E95FC.4050409@2ndquadrant.com
Whole thread Raw
In response to Re: proposal: plpgsql - Assert statement  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: plpgsql - Assert statement  (Marko Tiikkaja <marko@joh.to>)
Re: proposal: plpgsql - Assert statement  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 09/05/2014 05:21 PM, Pavel Stehule wrote:
> 
> *shrug*  Doing it in SQL would probably break more stuff.  I'm trying to
> contain the damage.  And arguably, this is mostly only useful in PL/PgSQL.

I've wanted assertions in SQL enough that I often write trivial wrappers
around `raise` in PL/PgSQL for use in `CASE` statements etc.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Scaling shared buffer eviction
Next
From: Craig Ringer
Date:
Subject: Re: proposal: plpgsql - Assert statement