diff options
author | Heikki Linnakangas | 2009-01-22 19:16:31 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2009-01-22 19:16:31 +0000 |
commit | 66fe9339b03ec748e247bc6a1e4e6ec5b7155c4e (patch) | |
tree | 9394b217cd8257d4d21664e4dc60e7bc3abc3901 | |
parent | 9a58076f74f9936f8af4f79f0ccd216e571dd9d3 (diff) |
Update comments to reflect that tgenabled is not a boolean anymore.
Jonah Harris, with minor tinkering by me.
-rw-r--r-- | src/backend/commands/trigger.c | 6 | ||||
-rw-r--r-- | src/include/commands/trigger.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 0b02b48e0c..a0a96974b4 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -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 diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index 400f345b4c..d3cd05ab61 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -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' |