Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c079090

Browse files
committed
Update comments to reflect that tgenabled is not a boolean anymore.
Jonah Harris, with minor tinkering by me.
1 parent dd7e54a commit c079090

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/backend/commands/trigger.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.244 2009/01/21 09:28:26 mha Exp $
10+
* $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.245 2009/01/22 19:16:31 heikki Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -992,12 +992,14 @@ renametrig(Oid relid,
992992
/*
993993
* EnableDisableTrigger()
994994
*
995-
* Called by ALTER TABLE ENABLE/DISABLE TRIGGER
995+
* Called by ALTER TABLE ENABLE/DISABLE [ REPLICA | ALWAYS ] TRIGGER
996996
* to change 'tgenabled' field for the specified trigger(s)
997997
*
998998
* rel: relation to process (caller must hold suitable lock on it)
999999
* tgname: trigger to process, or NULL to scan all triggers
1000-
* enable: new value for tgenabled field
1000+
* fires_when: new value for tgenabled field. In addition to generic
1001+
* enablement/disablement, this also defines when the trigger
1002+
* should be fired in session replication roles.
10011003
* skip_system: if true, skip "system" triggers (constraint triggers)
10021004
*
10031005
* Caller should have checked permissions for the table; here we also

src/include/commands/trigger.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.70 2009/01/01 17:23:58 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.71 2009/01/22 19:16:31 heikki Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -95,6 +95,10 @@ typedef struct TriggerData
9595
#define SESSION_REPLICATION_ROLE_LOCAL 2
9696
extern PGDLLIMPORT int SessionReplicationRole;
9797

98+
/*
99+
* States at which a trigger can be fired. These are the
100+
* possible values for pg_trigger.tgenabled.
101+
*/
98102
#define TRIGGER_FIRES_ON_ORIGIN 'O'
99103
#define TRIGGER_FIRES_ALWAYS 'A'
100104
#define TRIGGER_FIRES_ON_REPLICA 'R'

0 commit comments

Comments
 (0)