Update comments to reflect that tgenabled is not a boolean anymore.
authorHeikki Linnakangas <heikki@enterprisedb.com>
Thu, 22 Jan 2009 19:16:31 +0000 (19:16 +0000)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Thu, 22 Jan 2009 19:16:31 +0000 (19:16 +0000)
Jonah Harris, with minor tinkering by me.

src/backend/commands/trigger.c
src/include/commands/trigger.h

index 0b02b48e0c574f3c13f984f9464905a21eb38b14..a0a96974b4f11b3b046d959a9e87607678b5a459 100644 (file)
@@ -992,12 +992,14 @@ renametrig(Oid relid,
 /*
  * EnableDisableTrigger()
  *
- *     Called by ALTER TABLE ENABLE/DISABLE TRIGGER
+ *     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
- * enable: new value for tgenabled field
+ * fires_when: new value for tgenabled field. In addition to generic
+ *                        enablement/disablement, this also defines when the trigger
+ *                        should be fired in session replication roles.
  * skip_system: if true, skip "system" triggers (constraint triggers)
  *
  * Caller should have checked permissions for the table; here we also
index 400f345b4ccd4c3103dbc578055d94a099e6fd35..d3cd05ab613e023a14524e59ea879b747edcb085 100644 (file)
@@ -95,6 +95,10 @@ typedef struct TriggerData
 #define SESSION_REPLICATION_ROLE_LOCAL         2
 extern PGDLLIMPORT int SessionReplicationRole;
 
+/*
+ * States at which a trigger can be fired. These are the
+ * possible values for pg_trigger.tgenabled.
+ */
 #define TRIGGER_FIRES_ON_ORIGIN                                'O'
 #define TRIGGER_FIRES_ALWAYS                           'A'
 #define TRIGGER_FIRES_ON_REPLICA                       'R'