Re: proposal: plpgsql - Assert statement

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: plpgsql - Assert statement
Date: 2014-11-18 01:00:32
Message-ID: 546A9A30.7040108@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/17/14, 4:58 PM, Simon Riggs wrote:
>>> Great, looks good to me, marking as ready for committer.
>
> What is wrong with using IF ?

It's a hell of a lot wordier. I've previously created a more sophisticated "assert" framework to allow more control over things, but ended up also using it just for simple sanity checking because it was much nicer than typeing IF THEN RAISE ERROR END IF.
--
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 2014-11-18 01:24:45 Obsolete debug #define in pg_config_manual.h
Previous Message Michael Paquier 2014-11-18 00:02:17 Re: Review of Refactoring code for sync node detection