Document DELETE/UPDATE command tag vs triggers - Mailing list pgsql-docs

From Marti Raudsepp
Subject Document DELETE/UPDATE command tag vs triggers
Date
Msg-id CABRT9RAOE67OKF55n9+3ixw6-RiHhcvAUt2K-e49PUB0oZ8uWg@mail.gmail.com
Whole thread Raw
Responses Re: Document DELETE/UPDATE command tag vs triggers
List pgsql-docs
Hi list,

Currently the documentation for DELETE and UPDATE doesn't mention that
the number returned in the command tag is affected by triggers which
may suppress the change.

Worse, it currently states "If count is 0, no rows matched the
condition" which is incorrect -- the condition may have matched rows,
but the trigger might be suppressing the updates.

The new text says:

   The <replaceable class="parameter">count</replaceable> is the number
   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 <replaceable class="parameter">condition</replaceable> when
   updates were suppressed by a <literal>BEFORE UPDATE</> trigger.  If
   <replaceable class="parameter">count</replaceable> is 0, no rows were
   updated by the query (this is not considered an error).

Patch attached.

Regards,
Marti

Attachment

pgsql-docs by date:

Previous
From: Ray Stell
Date:
Subject: Re: create foreign table
Next
From: Robert Haas
Date:
Subject: Re: create foreign table