Re: Implementing SQL ASSERTION

Поиск
Список
Период
Сортировка
От Joe Wildish
Тема Re: Implementing SQL ASSERTION
Дата
Msg-id 467051FC-B88B-4550-A1C8-AAA2076DF029@elusive.cx
обсуждение исходный текст
Ответ на Re: Implementing SQL ASSERTION  (David Fetter <david@fetter.org>)
Список pgsql-hackers
Hi David,

> On 26 Sep 2018, at 19:47, David Fetter <david@fetter.org> wrote:
> 
>> Invalidating operations are "INSERT(t) and UPDATE(t.b, t.n)".
> 
> So would DELETE(t), assuming n can be negative.

Oops, right you are. Bug in my implementation :-) 

> Is there some interesting and fairly easily documented subset of
> ASSERTIONs that wouldn't have the "can't prove" property?

We can certainly know at the time the ASSERTION is created if we
can use the transition table optimisation, as that relies upon
the expression being written in such a way that a key can be
derived for each expression.

We could warn or disallow the creation on that basis. Ceri & Widom
mention this actually in their papers, and their view is that most
real-world use cases do indeed allow themselves to be optimised
using the transition tables.

-Joe




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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Cygwin linking rules
Следующее
От: David Hedberg
Дата:
Сообщение: Re: Adding pipe support to pg_dump and pg_restore