Skip to content

Commit f925c79

Browse files
committed
Further documentation tweaks for event triggers.
Per discussion between Dimitri Fontaine, myself, and others.
1 parent 601e293 commit f925c79

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

doc/src/sgml/event-trigger.sgml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,20 @@
4141
mechanism does not support these object types.
4242
<literal>ddl_command_start</> also occurs just before the execution of a
4343
<literal>SELECT INTO</literal> command, since this is equivalent to
44-
<literal>CREATE TABLE AS</literal>.
44+
<literal>CREATE TABLE AS</literal>. The <literal>ddl_command_end</>
45+
event occurs just after the execution of this same set of commands.
4546
</para>
4647

4748
<para>
48-
The <literal>ddl_command_end</> event occurs just before returning
49-
control from the execution of a <literal>CREATE</>, <literal>ALTER</>,
50-
or <literal>DROP</> command. It shares the same exceptions as
51-
the <literal>ddl_command_start</> event.
49+
Event triggers (like other functions) cannot be executed in an aborted
50+
transaction. Thus, if a DDL command fails with an error, any associated
51+
<literal>ddl_command_end</> triggers will not be executed. Conversely,
52+
if a <literal>ddl_command_start</> trigger fails with an error, no
53+
further event triggers will fire, and no attempt will be made to execute
54+
the command itself. Similarly, if a <literal>ddl_command_end</> trigger
55+
fails with an error, the effects of the DDL statement will be rolled
56+
back, just as they would be in any other case where the containing
57+
transaction aborts.
5258
</para>
5359

5460
<para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy