Skip to content

Commit 61dd737

Browse files
committed
Document DELETE/UPDATE command tag behavior when triggers are involved.
Marti Raudsepp
1 parent 0ff7ea5 commit 61dd737

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

doc/src/sgml/ref/delete.sgml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,12 @@ DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ [ AS ]
206206
DELETE <replaceable class="parameter">count</replaceable>
207207
</screen>
208208
The <replaceable class="parameter">count</replaceable> is the number
209-
of rows deleted. If <replaceable class="parameter">count</replaceable> is
210-
0, no rows matched the <replaceable
211-
class="parameter">condition</replaceable> (this is not considered
212-
an error).
209+
of rows deleted. Note that the number may be less than the number of
210+
rows that matched the <replaceable
211+
class="parameter">condition</replaceable> when deletes were
212+
suppressed by a <literal>BEFORE DELETE</> trigger. If <replaceable
213+
class="parameter">count</replaceable> is 0, no rows were deleted by
214+
the query (this is not considered an error).
213215
</para>
214216

215217
<para>

doc/src/sgml/ref/update.sgml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,12 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ [ AS ] <rep
226226
UPDATE <replaceable class="parameter">count</replaceable>
227227
</screen>
228228
The <replaceable class="parameter">count</replaceable> is the number
229-
of rows updated. If <replaceable class="parameter">count</replaceable> is
230-
0, no rows matched the <replaceable
231-
class="parameter">condition</replaceable> (this is not considered
232-
an error).
229+
of rows updated, including matched rows whose values did not change.
230+
Note that the number may be less than the number of rows that matched
231+
the <replaceable class="parameter">condition</replaceable> when
232+
updates were suppressed by a <literal>BEFORE UPDATE</> trigger. If
233+
<replaceable class="parameter">count</replaceable> is 0, no rows were
234+
updated by the query (this is not considered an error).
233235
</para>
234236

235237
<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