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

From Marko Tiikkaja
Subject Re: proposal: plpgsql - Assert statement
Date
Msg-id 546D1BE3.9040504@joh.to
Whole thread Raw
In response to Re: proposal: plpgsql - Assert statement  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: plpgsql - Assert statement  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: proposal: plpgsql - Assert statement  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 2014-11-19 23:18, Pavel Stehule wrote:
> 2014-11-19 18:01 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
>
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> On Wed, Nov 19, 2014 at 11:13 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> FWIW, I would vote against it also.  I do not find this to be a natural
>>>> extension of RAISE; it adds all sorts of semantic issues.  (In
>> particular,
>>>> what is the evaluation order of the WHEN versus the other subexpressions
>>>> of the RAISE?)
>>
>>> What I liked about this syntax was that we could eventually have:
>>> RAISE ASSERT WHEN stuff;
>>> ...and if assertions are disabled, we can skip evaluating the
>>> condition.  If you just write an IF .. THEN block you can't do that.
>>
>> Well, if that's what you want, let's just invent
>>
>> ASSERT condition
>>
>>
> there was this proposal .. ASSERT statement .. related discuss was
> finished, because it needs a reserved keyword "ASSERT".

Finished?  Really?

This was Heikki's take on the discussion that took place a good while 
ago: http://www.postgresql.org/message-id/5405FF73.1010206@vmware.com. 
And in the same thread you also said you like it: 
http://www.postgresql.org/message-id/CAFj8pRAC-ZWDrbU-uj=xQOWQtbAqR5oXsM1xYOyhZmyeuvZvQA@mail.gmail.co.  But perhaps
you'vechanged your mind since then (which is fine.)  Or 
 
maybe that was only in the case where we'd have a special mode where you 
could opt-in if you're willing to accept the backwards compatibility issue?

I also went back to the original thread, and I think Heikki's summary 
dismissed e.g. Robert's criticism quite lightly: 
http://www.postgresql.org/message-id/CA+TgmobWoSSRNcV_iJK3xhsytXb7Dv0AWGvWkMEurNTOVEZYyw@mail.gmail.com


.marko



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: amcheck prototype
Next
From: Petr Jelinek
Date:
Subject: Re: Add shutdown_at_recovery_target option to recovery.conf