Re: proposal: plpgsql - Assert statement
От | Jan Wieck |
---|---|
Тема | Re: proposal: plpgsql - Assert statement |
Дата | |
Msg-id | 541A2A13.20100@wi3ck.info обсуждение исходный текст |
Ответ на | Re: proposal: plpgsql - Assert statement (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: proposal: plpgsql - Assert statement
|
Список | pgsql-hackers |
On 09/17/2014 03:36 PM, Peter Eisentraut wrote: > On 9/17/14 3:04 PM, Pavel Stehule wrote: >> What is difference between content of variable or content of database? >> You can test any prerequisite, but when this prerequisite is not solved, >> than exception is very very hard without possible handling. > > If the assertion tests arbitrary Boolean expressions, then we can't stop > the user from abusing them. Exactly. Doing something like ASSERT (select count(*) from foo where fk not in (select pk from bar)) = 0; is a perfectly fine, arbitrary boolean expression. It will probably work well in a development environment too. And I am very sure that it will not scale well once that code gets deployed. And I know how DBAs react to the guaranteed following performance problem. They will disable ALL assert ... or was there some sort of assert class system proposed that I missed? > > But it's another thing if we design specific syntax that encourages such > abuse, as proposed earlier. The design should explicitly discourage that sort of nonsense. Jan -- Jan Wieck Senior Software Engineer http://slony.info
В списке pgsql-hackers по дате отправления: