Re: proposal: plpgsql - Assert statement
От | Pavel Stehule |
---|---|
Тема | Re: proposal: plpgsql - Assert statement |
Дата | |
Msg-id | CAFj8pRA-omKUBf=vRNhXW+4q+3Vf961yWu6ntEdNmgg57eU1hw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: proposal: plpgsql - Assert statement (Marko Tiikkaja <marko@joh.to>) |
Ответы |
Re: proposal: plpgsql - Assert statement
|
Список | pgsql-hackers |
2014-09-06 19:26 GMT+02:00 Marko Tiikkaja <marko@joh.to>:
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.
this doesn't to supply assertions, it is just shorter form
Pavel
.marko
В списке pgsql-hackers по дате отправления: