2014-09-06 19:26 GMT+02:00 Marko Tiikkaja <ma...@joh.to>:

> On 2014-09-06 7:27 AM, Pavel Stehule wrote:
>
>> 2014-09-05 14:35 GMT+02:00 Jan Wieck <j...@wi3ck.info>:
>>
>>> Adding a WHEN clause to RAISE would have the benefit of not needing any
>>> new keywords at all.
>>>
>>> RAISE EXCEPTION 'format' [, expr ...] WHEN row_count <> 1;
>>>
>>>
>> It was one my older proposal.
>>
>> Can we find a agreement there?
>>
>
> I find:
>
>   1) The syntax less readable than  IF row_count <> 1 THEN RAISE EXCEPTION
> ..; END IF;
>   2) It needless to require the user to specify an error message for every
> assertion.
>   3) Allowing these to be disabled would be weird (though I might be the
> only one who wants that feature at this point).
>   4) It would also be weird to display the parameters passed to the WHEN
> clause like I suggested here: http://www.postgresql.org/
> message-id/54096ba4.5030...@joh.to .  I think that's a crucial part of
> the feature.
>
> So at least the vote isn't unanimous: -1 from me.
>

this doesn't to supply assertions, it is just shorter form

Pavel


>
>
> .marko
>

Reply via email to