Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2f6c845

Browse files
committed
Fix erroneous documentation of the syntax of CREATE CONSTRAINT TRIGGER.
The grammar requires a specific ordering of the clauses, but thedocumentation showed a different order. This error was introduced incommitb47953f, which merged the CREATECONSTRAINT TRIGGER documentation into the CREATE TRIGGER page. There isno code bug AFAICS.
1 parent7e49330 commit2f6c845

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎doc/src/sgml/ref/create_trigger.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ PostgreSQL documentation
2222
<refsynopsisdiv>
2323
<synopsis>
2424
CREATE [ CONSTRAINT ] TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTER | INSTEAD OF } { <replaceable class="PARAMETER">event</replaceable> [ OR ... ] }
25-
ON <replaceable class="PARAMETER">table</replaceable> [ FOR [ EACH ] { ROW | STATEMENT } ]
25+
ON <replaceable class="PARAMETER">table</replaceable>
2626
[ FROM <replaceable class="parameter">referenced_table_name</replaceable> ]
2727
{ NOT DEFERRABLE | [ DEFERRABLE ] { INITIALLY IMMEDIATE | INITIALLY DEFERRED } }
28+
[ FOR [ EACH ] { ROW | STATEMENT } ]
2829
[ WHEN ( <replaceable class="parameter">condition</replaceable> ) ]
2930
EXECUTE PROCEDURE <replaceable class="PARAMETER">function_name</replaceable> ( <replaceable class="PARAMETER">arguments</replaceable> )
3031
</synopsis>
@@ -518,8 +519,8 @@ CREATE TRIGGER view_insert
518519
deletes fire <emphasis>after</> the cascaded <literal>DELETE</> completes.
519520
The <productname>PostgreSQL</productname> behavior is for <literal>BEFORE
520521
DELETE</literal> to always fire before the delete action, even a cascading
521-
one. This is considered more consistent. There is alsounpredictable
522-
behaviorwhen <literal>BEFORE</literal> triggers modify rows or prevent
522+
one. This is considered more consistent. There is alsononstandard
523+
behaviorif <literal>BEFORE</literal> triggers modify rows or prevent
523524
updates during an update that is caused by a referential action. This can
524525
lead to constraint violations or stored data that does not honor the
525526
referential constraint.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp