Re: proposal: plpgsql - Assert statement

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(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 04:37:24
Message-ID: CAFj8pRC5zg8=EVVS1FFY4bC3gdEueW9U7O_TURtjTehmJewrhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-11-17 23:58 GMT+01:00 Simon Riggs <simon(at)2ndquadrant(dot)com>:

> >> Great, looks good to me, marking as ready for committer.
>
> What is wrong with using IF ?
>

It significantly increase code' length .. and decrease readability when you
intensive use a pattern IF THEN RAISE END IF - when you check every
parameter, when you check every result.

RAISE ... WHEN ... is shorter with full power of RAISE statement and
possibility for future enhancing.

Regards

Pavel

>
> --
> Simon Riggs http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2014-11-18 04:57:57 Re: using custom scan nodes to prototype parallel sequential scan
Previous Message Rajeev rastogi 2014-11-18 04:10:58 Re: Index scan optimization