Re: Triggers on columns

Поиск
Список
Период
Сортировка
От Itagaki Takahiro
Тема Re: Triggers on columns
Дата
Msg-id 20090907110957.C84F.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Triggers on columns  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Triggers on columns  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Here is a updated version of column-trigger patch.

Changes from the previous patch:
  * Add dependency of columns with recordDependencyOn().
    Regression tests are also adjusted.
  * Recheck columns if NEW values are modified, but each trigger
    will be firec only one per row.


Peter Eisentraut <peter_e@gmx.net> wrote:
> The SQL standard specifies that a trigger is fired if the column is
> mentioned in the UPDATE statement, independent of whether the value is
> actually changed through the update.

We are discussing how to determine modified columns
(UPDATE-target vs. changes of actual values), but in the patch
I used value-based checking. The reasons are:
    1. Other triggers could modify referred columns even if the columns
       are not specifed in UPDATE-target.
    2. IMHO, almost users don't expect their triggers are not called
       if the actual values are not modified.
    3. Restriction of implementation; We don't have RTE in trigger
       routine for now. The current patch doesn't modify codes a lot.

Comments welcome.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Вложения

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

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Re: [PATCH] Largeobject access controls
Следующее
От: Itagaki Takahiro
Дата:
Сообщение: _WIN32_WINNT should be 0x0501 in win32.h