Document new trigger-related forms of ALTER FOREIGN TABLE.
authorNoah Misch
Tue, 19 Aug 2014 02:58:25 +0000 (22:58 -0400)
committerNoah Misch
Tue, 19 Aug 2014 02:58:44 +0000 (22:58 -0400)
Oversight in commit 7cbe57c34dec4860243e6d0f81738cfbb6e5d069.
Back-patch to 9.4, where that commit first appeared.  In passing,
release-note the FDW API postcondition change from the same commit.

doc/src/sgml/ref/alter_foreign_table.sgml
doc/src/sgml/release-9.4.sgml

index 4d8cfc522e050a0c63e90661086e4d06bcbc5cf6..9d9c439315f3912ca38a0e0aa30effe2458ec504 100644 (file)
@@ -42,6 +42,10 @@ ALTER FOREIGN TABLE [ IF EXISTS ] name
     ALTER [ COLUMN ] column_name SET ( attribute_option = value [, ... ] )
     ALTER [ COLUMN ] column_name RESET ( attribute_option [, ... ] )
     ALTER [ COLUMN ] column_name OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ])
+    DISABLE TRIGGER [ trigger_name | ALL | USER ]
+    ENABLE TRIGGER [ trigger_name | ALL | USER ]
+    ENABLE REPLICA TRIGGER trigger_name
+    ENABLE ALWAYS TRIGGER trigger_name
     OWNER TO new_owner
     OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ])
 
@@ -148,6 +152,17 @@ ALTER FOREIGN TABLE [ IF EXISTS ] name
     
    
 
+   
+    DISABLE/ENABLE [ REPLICA | ALWAYS ] TRIGGER
+    
+     
+      These forms configure the firing of trigger(s) belonging to the foreign
+      table.  See the similar form of  for more
+      details.
+     
+    
+   
+
    
     OWNER
     
@@ -289,6 +304,37 @@ ALTER FOREIGN TABLE [ IF EXISTS ] name
       
      
 
+     
+      trigger_name
+      
+       
+        Name of a single trigger to disable or enable.
+       
+      
+     
+
+     
+      ALL
+      
+       
+        Disable or enable all triggers belonging to the foreign table.  (This
+        requires superuser privilege if any of the triggers are internally
+        generated triggers.  The core system does not add such triggers to
+        foreign tables, but add-on code could do so.)
+       
+      
+     
+
+     
+      USER
+      
+       
+        Disable or enable all triggers belonging to the foreign table except
+        for internally generated triggers.
+       
+      
+     
+
      
       new_owner
       
index 1782be42fc47e0ad9b78734bb125ad47833383ee..e338554995dfb6a93b551982e890b4a44047bce4 100644 (file)
      
     
 
+    
+     
+      Writable foreign data wrappers must return all columns when the foreign
+      table has an AFTER ROW trigger (Noah Misch)
+     
+
+     
+      Previously, foreign tables never had triggers, and
+      the RETURNING clause alone dictated the columns required.
+     
+    
+
     
      
       Rename EXPLAIN