Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
ede54f3c
Commit
ede54f3c
authored
19 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Add documentation about the behavior of BEFORE triggers and referential
integrity actions. Stephan Szabo
parent
9c9b9446
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/ref/create_trigger.sgml
+14
-2
14 additions, 2 deletions
doc/src/sgml/ref/create_trigger.sgml
with
14 additions
and
2 deletions
doc/src/sgml/ref/create_trigger.sgml
+
14
−
2
View file @
ede54f3c
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.4
2
2005/1
1
/0
1 21:09:50 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.4
3
2005/1
2
/0
9 19:39:41 momjian
Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -241,13 +241,25 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
...
@@ -241,13 +241,25 @@ CREATE TRIGGER <replaceable class="PARAMETER">name</replaceable> { BEFORE | AFTE
function that executes the desired commands.
function that executes the desired commands.
</para>
</para>
</listitem>
</listitem>
</itemizedlist>
</itemizedlist>
</para>
</para>
<para>
<para>
SQL specifies that multiple triggers should be fired in
SQL specifies that multiple triggers should be fired in
time-of-creation order. <productname>PostgreSQL</productname> uses
time-of-creation order. <productname>PostgreSQL</productname> uses
name order, which was judged more convenient to work with.
name order, which was judged to be more convenient.
</para>
<para>
SQL specifies that <literal>BEFORE DELETE</literal> triggers on cascaded
deletes fire <emphasis>after</> the cascaded <literal>DELETE</> completes.
The <productname>PostgreSQL</productname> behavior is for <literal>BEFORE
DELETE</literal> to always fire before the delete action, even a cascading
one. This is considered more consistent. There is also unpredictable
behavior when <literal>BEFORE</literal> triggers modify rows that are later
to be modified by referential actions. This can lead to contraint violations
or stored data that does not honor the referential constraint.
</para>
</para>
<para>
<para>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment