Re: proposal: plpgsql - Assert statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal: plpgsql - Assert statement
Дата
Msg-id 14089.1427324896@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: proposal: plpgsql - Assert statement  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: proposal: plpgsql - Assert statement  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> On 3/25/15 1:21 AM, Pavel Stehule wrote:
>> 2015-03-25 0:17 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us
>> <mailto:tgl@sss.pgh.pa.us>>:
>>> (BTW, is considering
>>> NULL to be a failure the right thing?  SQL CHECK conditions consider
>>> NULL to be allowed ...)

>> This is a question - I am happy with SQL CHECK for data, but I am not
>> sure if same behave is safe for plpgsql (procedural) assert. More
>> stricter behave is safer  - and some bugs in procedures are based on
>> unhandled NULLs in variables. So in this topic I prefer implemented
>> behave. It is some like:

> +1. I think POLA here is that an assert must be true and only true to be 
> valid. If someone was unhappy with that they could always coalesce(..., 
> true).

Fair enough.  Committed with the other changes.
        regards, tom lane



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Abbreviated keys for Numeric
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add macros wrapping all usage of gcc's __attribute__.