Re: [PATCH] SQL assertions prototype

Поиск
Список
Период
Сортировка
От Andrew Tipton
Тема Re: [PATCH] SQL assertions prototype
Дата
Msg-id CA+M2pVVT3_szvtkMKR-ViA1r4Xo5C-0URuGwL8BN47KmS-5Exg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] SQL assertions prototype  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: [PATCH] SQL assertions prototype  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-hackers
On Sun, Nov 24, 2013 at 11:03 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> So we'd need to get access to the changed rows, rather than
> re-executing a huge SQL command that re-checks every row of the table.
> That last point will make it unusable for sensible amounts of data.

That sounds very similar to handling incremental maintenance of
materialized views, which Kevin is working on.

Let's assume that the "huge SQL command that re-checks every row of
the table" is actually a materialized view.  In that case, the CREATE
ASSERTION trigger would merely need to scan the matview and raise an
error if any rows were present.  That should be a very quick
operation.  No need to invent some sort of "get access to the changed
rows" mechanism especially for CREATE ASSERTION.


Kind regards,
Andrew Tipton



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

Предыдущее
От: Rodolfo Campero
Дата:
Сообщение: Re: PL/Python: domain over array support
Следующее
От: Andrew Tipton
Дата:
Сообщение: Re: Add CREATE support to event triggers