From: Robert Haas Date: Mon, 10 Oct 2011 16:53:04 +0000 (-0400) Subject: Document DELETE/UPDATE command tag behavior when triggers are involved. X-Git-Tag: REL9_2_BETA1~1005 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61dd737c29661763448d61786ec1aa260db0412a;p=postgresql Document DELETE/UPDATE command tag behavior when triggers are involved. Marti Raudsepp --- 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).