git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd7e54a)
Update comments to reflect that tgenabled is not a boolean anymore.
2009年1月22日 19:16:31 +0000 (19:16 +0000)
2009年1月22日 19:16:31 +0000 (19:16 +0000)
Jonah Harris, with minor tinkering by me.


diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 09cc7860e0c73b1b61d94915c16d86e6c4fb46ee..699493c3350e07f9100cadbed6d4223932286ec0 100644 (file)
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.244 2009年01月21日 09:28:26 mha Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.245 2009年01月22日 19:16:31 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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 50f11078a5066b916bb393d23a994eaecfad97b1..0b0c6c22323265b3b4d9b6de653d00332bdbd531 100644 (file)
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.70 2009年01月01日 17:23:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.71 2009年01月22日 19:16:31 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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'
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /