File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
9
* 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 $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -992,12 +992,14 @@ renametrig(Oid relid,
992
992
/*
993
993
* EnableDisableTrigger()
994
994
*
995
- * Called by ALTER TABLE ENABLE/DISABLE TRIGGER
995
+ * Called by ALTER TABLE ENABLE/DISABLE [ REPLICA | ALWAYS ] TRIGGER
996
996
* to change 'tgenabled' field for the specified trigger(s)
997
997
*
998
998
* rel: relation to process (caller must hold suitable lock on it)
999
999
* 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.
1001
1003
* skip_system: if true, skip "system" triggers (constraint triggers)
1002
1004
*
1003
1005
* Caller should have checked permissions for the table; here we also
Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
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 $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
@@ -95,6 +95,10 @@ typedef struct TriggerData
95
95
#define SESSION_REPLICATION_ROLE_LOCAL 2
96
96
extern PGDLLIMPORT int SessionReplicationRole ;
97
97
98
+ /*
99
+ * States at which a trigger can be fired. These are the
100
+ * possible values for pg_trigger.tgenabled.
101
+ */
98
102
#define TRIGGER_FIRES_ON_ORIGIN 'O'
99
103
#define TRIGGER_FIRES_ALWAYS 'A'
100
104
#define TRIGGER_FIRES_ON_REPLICA 'R'
You can’t perform that action at this time.
0 commit comments