Re: proposal: plpgsql - Assert statement

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: plpgsql - Assert statement
Дата
Msg-id CAFj8pRC--EZp9sNcGFeV2ZnLVr8k1jmWen=Q7xY4yw78LUjPWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: plpgsql - Assert statement  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers


2014-09-17 21:36 GMT+02:00 Peter Eisentraut <peter_e@gmx.net>:
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.


I am thinking so unhandled signal can be good defence. (and possibility to disable assertions)

We design a database system, so we should to reflect it - plpgsql (or any PL environment) are not classic language. There are lot of database specific constructs.
 
But it's another thing if we design specific syntax that encourages such
abuse, as proposed earlier.


Other note - I am thinking so ANSI SQL Assertions and PL assertions are independent features. Although they can have some common goals.

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Turning off HOT/Cleanup sometimes
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: Anonymous code block with parameters