pgsql: When enqueueing after-row triggers for updates of a table with a

Поиск
Список
Период
Сортировка
От neilc@svr1.postgresql.org (Neil Conway)
Тема pgsql: When enqueueing after-row triggers for updates of a table with a
Дата
Msg-id 20050530072059.9BE4352853@svr1.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
When enqueueing after-row triggers for updates of a table with a foreign
key, compare the new and old row versions. If the foreign key column has
not changed, we needn't enqueue the trigger, since the update cannot
violate the foreign key. This optimization was previously applied in the
RI trigger function, but it is more efficient to avoid firing the trigger
altogether. Per recent discussion on pgsql-hackers.

Also add a regression test for some unintuitive foreign key behavior, and
refactor some code that deals with the OIDs of the various RI trigger
functions.

Modified Files:
--------------
    pgsql/src/backend/commands:
        tablecmds.c (r1.158 -> r1.159)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c.diff?r1=1.158&r2=1.159)
        trigger.c (r1.188 -> r1.189)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c.diff?r1=1.188&r2=1.189)
    pgsql/src/backend/utils/adt:
        ri_triggers.c (r1.78 -> r1.79)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ri_triggers.c.diff?r1=1.78&r2=1.79)
    pgsql/src/include/commands:
        trigger.h (r1.53 -> r1.54)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/trigger.h.diff?r1=1.53&r2=1.54)
    pgsql/src/test/regress/expected:
        foreign_key.out (r1.38 -> r1.39)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/foreign_key.out.diff?r1=1.38&r2=1.39)
    pgsql/src/test/regress/sql:
        foreign_key.sql (r1.15 -> r1.16)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/foreign_key.sql.diff?r1=1.15&r2=1.16)

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

Предыдущее
От: neilc@svr1.postgresql.org (Neil Conway)
Дата:
Сообщение: pgsql: Create separate ON INSERT and ON UPDATE triggers on tables with
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pgswish - pgswish: subversion revision 23 commited to CVS