Fix erroneous documentation of the syntax of CREATE CONSTRAINT TRIGGER.
authorTom Lane
Wed, 2 Mar 2011 16:39:18 +0000 (11:39 -0500)
committerTom Lane
Wed, 2 Mar 2011 16:39:18 +0000 (11:39 -0500)
The grammar requires a specific ordering of the clauses, but the
documentation showed a different order.  This error was introduced in
commit b47953f9c69d48a9261bd643e3170017b93f6337, which merged the CREATE
CONSTRAINT TRIGGER documentation into the CREATE TRIGGER page.  There is
no code bug AFAICS.

doc/src/sgml/ref/create_trigger.sgml

index 492611eea8b2c41916cbddf2296435373147a864..e697ab6cc936525c93683a0410dc68c8712a14cd 100644 (file)
@@ -22,9 +22,10 @@ PostgreSQL documentation
  
 
 CREATE [ CONSTRAINT ] TRIGGER name { BEFORE | AFTER | INSTEAD OF } { event [ OR ... ] }
-    ON table [ FOR [ EACH ] { ROW | STATEMENT } ]
+    ON table
     [ FROM referenced_table_name ]
     { NOT DEFERRABLE | [ DEFERRABLE ] { INITIALLY IMMEDIATE | INITIALLY DEFERRED } }
+    [ FOR [ EACH ] { ROW | STATEMENT } ]
     [ WHEN ( condition ) ]
     EXECUTE PROCEDURE function_name ( arguments )
 
@@ -518,8 +519,8 @@ CREATE TRIGGER view_insert
    deletes fire after the cascaded DELETE completes.
    The PostgreSQL behavior is for BEFORE
    DELETE to always fire before the delete action, even a cascading
-   one.  This is considered more consistent.  There is also unpredictable
-   behavior when BEFORE triggers modify rows or prevent
+   one.  This is considered more consistent.  There is also nonstandard
+   behavior if BEFORE triggers modify rows or prevent
    updates during an update that is caused by a referential action.  This can
    lead to constraint violations or stored data that does not honor the
    referential constraint.