From 61dd737c29661763448d61786ec1aa260db0412a Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 10 Oct 2011 12:53:04 -0400 Subject: [PATCH] Document DELETE/UPDATE command tag behavior when triggers are involved. Marti Raudsepp --- doc/src/sgml/ref/delete.sgml | 10 ++++++---- doc/src/sgml/ref/update.sgml | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/doc/src/sgml/ref/delete.sgml b/doc/src/sgml/ref/delete.sgml index 71ebeda880..6366b15811 100644 --- a/doc/src/sgml/ref/delete.sgml +++ b/doc/src/sgml/ref/delete.sgml @@ -206,10 +206,12 @@ DELETE FROM [ ONLY ] table [ [ AS ] DELETE count The count is the number - of rows deleted. If count is - 0, no rows matched the condition (this is not considered - an error). + of rows deleted. Note that the number may be less than the number of + rows that matched the condition when deletes were + suppressed by a BEFORE DELETE trigger. If count is 0, no rows were deleted by + the query (this is not considered an error). diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index ba5af8e884..1c0e21536b 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -226,10 +226,12 @@ UPDATE [ ONLY ] table [ [ AS ] count The count is the number - of rows updated. If count is - 0, no rows matched the condition (this is not considered - an error). + of rows updated, including matched rows whose values did not change. + Note that the number may be less than the number of rows that matched + the condition when + updates were suppressed by a BEFORE UPDATE trigger. If + count is 0, no rows were + updated by the query (this is not considered an error). -- 2.40.0