Re: assertions and constraint triggers

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: assertions and constraint triggers
Дата
Msg-id 4C625718.40609@cs.helsinki.fi
обсуждение исходный текст
Ответ на assertions and constraint triggers  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: assertions and constraint triggers  (Nicolas Barbier <nicolas.barbier@gmail.com>)
Re: assertions and constraint triggers  (Peter Eisentraut <peter_e@gmx.net>)
Re: assertions and constraint triggers  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 8/11/10 8:31 AM +0300, Peter Eisentraut wrote:
> Thinking about SQL assertions (check constraints that are independent of
> one particular table), do you think it would be reasonable to implement
> those on top of constraint triggers?  On creation you'd hook up a
> trigger to each of the affected tables.  And the trigger function runs
> the respective check expression.  Conceptually, this doesn't seem to be
> very far away from foreign key constraints after all.

I thought the point of ASSERTIONs was that you could write a thing such as:

CREATE ASSERTION foo CHECK ((SELECT count(*) FROM tbl) = 4);

Enforcing that kind of constraints without true serializability seems 
impractical.


Regards,
Marko Tiikkaja


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Cost of AtEOXact_Buffers in --enable-cassert
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Bug / shortcoming in has_*_privilege