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 <pete...@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
column-trigger-20090907.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers