diff -cr pgsql/src/backend/commands/trigger.c pgsql-trigcommentclean/src/backend/commands/trigger.c *** pgsql/src/backend/commands/trigger.c Fri Oct 24 19:42:35 2008 --- pgsql-trigcommentclean/src/backend/commands/trigger.c Wed Nov 5 23:32:27 2008 *************** *** 1016,1027 **** /* * EnableDisableTrigger() * ! * Called by ALTER TABLE ENABLE/DISABLE TRIGGER * to change 'tgenabled' field for the specified trigger(s) * * rel: relation to process (caller must hold suitable lock on it) * tgname: trigger to process, or NULL to scan all triggers ! * enable: new value for tgenabled field * skip_system: if true, skip "system" triggers (constraint triggers) * * Caller should have checked permissions for the table; here we also --- 1016,1029 ---- /* * EnableDisableTrigger() * ! * Called by ALTER TABLE ENABLE/DISABLE [ REPLICA | ALWAYS ] TRIGGER * to change 'tgenabled' field for the specified trigger(s) * * rel: relation to process (caller must hold suitable lock on it) * tgname: trigger to process, or NULL to scan all triggers ! * fires_when: when the trigger should be fired. In addition to generic ! * enablement/disablement, this also defines when the trigger ! * should be fired in session replication roles (assigned to tgenabled) * skip_system: if true, skip "system" triggers (constraint triggers) * * Caller should have checked permissions for the table; here we also diff -cr pgsql/src/include/commands/trigger.h pgsql-trigcommentclean/src/include/commands/trigger.h *** pgsql/src/include/commands/trigger.h Fri Oct 24 19:42:35 2008 --- pgsql-trigcommentclean/src/include/commands/trigger.h Wed Nov 5 23:16:31 2008 *************** *** 95,100 **** --- 95,103 ---- #define SESSION_REPLICATION_ROLE_LOCAL 2 extern PGDLLIMPORT int SessionReplicationRole; + /* + * States at which a trigger can be fired. + */ #define TRIGGER_FIRES_ON_ORIGIN 'O' #define TRIGGER_FIRES_ALWAYS 'A' #define TRIGGER_FIRES_ON_REPLICA 'R'