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

From Andrew Dunstan
Subject Re: proposal: plpgsql - Assert statement
Date
Msg-id 546BABA7.9090102@dunslane.net
Whole thread Raw
In response to Re: proposal: plpgsql - Assert statement  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: proposal: plpgsql - Assert statement  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 11/18/2014 02:53 PM, Jim Nasby wrote:
> On 11/18/14, 9:31 AM, Andrew Dunstan wrote:
>>
>> Frankly, I find this whole proposal, and all the suggested 
>> alternatives, somewhat ill-conceived. PLPGSQL is a wordy language. If 
>> you want something more terse, use something else. Adding these sorts 
>> of syntactic sugar warts onto the language doesn't seem like a 
>> terribly good way to proceed.
>
> Such as?
>
> The enormous advantage of plpgsql is how easy it is to run SQL. Every 
> other PL I've looked at makes that WAY harder. And that's assuming 
> you're in an environment where you can install another PL.
>
> And honestly, I've never really found plpgsql to be terribly wordy 
> except in a few cases ("assert" being one of them). My general 
> experience has been that when I'm doing an IF (other than assert), I'm 
> doing multiple things in the IF block, so it's really not that big a 
> deal.
>


I frequently write one-statement bodies of IF statements. To me that's 
not a big deal either :-)

cheers

andrew



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BRIN and PageIndexDeleteNoCompact
Next
From: Adam Brightwell
Date:
Subject: Re: Additional role attributes && superuser review