Re: proposal: plpgsql - Assert statement

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: proposal: plpgsql - Assert statement
Дата
Msg-id 5419D945.3000400@gmx.net
обсуждение исходный текст
Ответ на Re: proposal: plpgsql - Assert statement  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 9/16/14 12:01 AM, Alvaro Herrera wrote:
> Jan Wieck wrote:
>> I think that most data integrity issues can be handled by a well
>> designed database schema that uses UNIQUE, NOT NULL, REFERENCES and
>> CHECK constraints. Assertions are usually found inside of complex
>> code constructs to check values of local variables. I don't think it
>> is even a good idea to implement assertions that can query arbitrary
>> data.
> 
> Actually Peter Eisentraut posted a patch for SQL assertions:
> http://www.postgresql.org/message-id/1384486216.5008.17.camel@vanquo.pezone.net

SQL assertions are just a kind of CHECK constraint, so fully
Jan-compliant. ;-)

I don't mind PL/pgSQL having an "assert" statement like many programming
languages, but I find a lot of the proposed details dubious.



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

Предыдущее
От: Emanuel Calvo
Дата:
Сообщение: Re: Turning off HOT/Cleanup sometimes
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: proposal: plpgsql - Assert statement