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

Commitf1f2b27

Browse files
committed
Fix portal management code to support non-default command completion tags for
portals using PORTAL_UTIL_SELECT strategy. This is currently significant onlyfor FETCH queries, which are supposed to include a count in the tag. Seemsit's been broken since 7.4, but nobody noticed before Knut Lehre.
1 parentaa728d5 commitf1f2b27

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/backend/tcop/pquery.c

Lines changed: 8 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.112 2007/01/05 22:19:39 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.113 2007/02/1819:49:25 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -919,6 +919,8 @@ FillPortalStore(Portal portal)
919919
PortalCreateHoldStore(portal);
920920
treceiver=CreateDestReceiver(DestTuplestore,portal);
921921

922+
completionTag[0]='\0';
923+
922924
switch (portal->strategy)
923925
{
924926
casePORTAL_ONE_RETURNING:
@@ -929,13 +931,11 @@ FillPortalStore(Portal portal)
929931
* tuplestore. Auxiliary query outputs are discarded.
930932
*/
931933
PortalRunMulti(portal,treceiver,None_Receiver,completionTag);
932-
/* Override default completion tag with actual command result */
933-
portal->commandTag=pstrdup(completionTag);
934934
break;
935935

936936
casePORTAL_UTIL_SELECT:
937937
PortalRunUtility(portal,linitial(portal->parseTrees),
938-
treceiver,NULL);
938+
treceiver,completionTag);
939939
break;
940940

941941
default:
@@ -944,6 +944,10 @@ FillPortalStore(Portal portal)
944944
break;
945945
}
946946

947+
/* Override default completion tag with actual command result */
948+
if (completionTag[0]!='\0')
949+
portal->commandTag=pstrdup(completionTag);
950+
947951
(*treceiver->rDestroy) (treceiver);
948952
}
949953

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp