diff options
Diffstat (limited to 'src/include/commands/trigger.h')
-rw-r--r-- | src/include/commands/trigger.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h index ac9eb7296d1..8fcd0bb6aa7 100644 --- a/src/include/commands/trigger.h +++ b/src/include/commands/trigger.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.61 2007/02/14 01:58:58 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.62 2007/03/19 23:38:31 wieck Exp $ * *------------------------------------------------------------------------- */ @@ -78,6 +78,18 @@ typedef struct TriggerData #define TRIGGER_FIRED_AFTER(event) \ (!TRIGGER_FIRED_BEFORE (event)) +/* + * Definitions for the replication role based firing. + */ +#define SESSION_REPLICATION_ROLE_ORIGIN 0 +#define SESSION_REPLICATION_ROLE_REPLICA 1 +#define SESSION_REPLICATION_ROLE_LOCAL 2 +extern int SessionReplicationRole; + +#define TRIGGER_FIRES_ON_ORIGIN 'O' +#define TRIGGER_FIRES_ALWAYS 'A' +#define TRIGGER_FIRES_ON_REPLICA 'R' +#define TRIGGER_DISABLED 'D' extern Oid CreateTrigger(CreateTrigStmt *stmt, Oid constraintOid); @@ -88,7 +100,7 @@ extern void RemoveTriggerById(Oid trigOid); extern void renametrig(Oid relid, const char *oldname, const char *newname); extern void EnableDisableTrigger(Relation rel, const char *tgname, - bool enable, bool skip_system); + char fires_when, bool skip_system); extern void RelationBuildTriggers(Relation relation); |