Re: proposal: plpgsql - Assert statement

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: proposal: plpgsql - Assert statement
Дата
Msg-id 540B43C2.1020808@joh.to
обсуждение исходный текст
Ответ на Re: proposal: plpgsql - Assert statement  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: plpgsql - Assert statement  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 2014-09-06 7:27 AM, Pavel Stehule wrote:
> 2014-09-05 14:35 GMT+02:00 Jan Wieck <jan@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.5030600@joh.to .  I think 
that's a crucial part of the feature.

So at least the vote isn't unanimous: -1 from me.


.marko



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Petr Jelinek
Дата:
Сообщение: Re: proposal: plpgsql - Assert statement
Следующее
От: Oskari Saarenmaa
Дата:
Сообщение: Re: PL/pgSQL 1.2