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

From Pavel Stehule
Subject Re: proposal: plpgsql - Assert statement
Date
Msg-id CAFj8pRC5zg8=EVVS1FFY4bC3gdEueW9U7O_TURtjTehmJewrhw@mail.gmail.com
Whole thread Raw
In response to Re: proposal: plpgsql - Assert statement  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers


2014-11-17 23:58 GMT+01:00 Simon Riggs <simon@2ndquadrant.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

pgsql-hackers by date:

Previous
From: Rajeev rastogi
Date:
Subject: Re: Index scan optimization
Next
From: Kouhei Kaigai
Date:
Subject: Re: using custom scan nodes to prototype parallel sequential scan