Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbbdf72b

Browse files
committed
Improve C comment about why we return "0 0" for some tags.
1 parent7507b19 commitbbdf72b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎src/backend/tcop/pquery.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.134 2010/01/02 16:57:52 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.135 2010/02/13 22:45:41 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1318,9 +1318,14 @@ PortalRunMulti(Portal portal, bool isTopLevel,
13181318
* If a command completion tag was supplied, use it. Otherwise use the
13191319
* portal's commandTag as the default completion tag.
13201320
*
1321-
* Exception: clients will expect INSERT/UPDATE/DELETE tags to have
1322-
* counts, so fake something up if necessary. (This could happen if the
1323-
* original query was replaced by a DO INSTEAD rule.)
1321+
* Exception: Clients expect INSERT/UPDATE/DELETE tags to have
1322+
* counts, so fake them with zeros. This can happen with DO INSTEAD
1323+
* rules if there is no replacement query of the same type as the
1324+
* original. We print "0 0" here because technically there is no
1325+
* query of the matching tag type, and printing a non-zero count for
1326+
* a different query type seems wrong, e.g. an INSERT that does
1327+
* an UPDATE instead should not print "0 1" if one row
1328+
* was updated. See QueryRewrite(), step 3, for details.
13241329
*/
13251330
if (completionTag&&completionTag[0]=='\0')
13261331
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp