Skip to content

Commit d96c374

Browse files
committed
Use new forboth() macro to make loop coding a bit clearer.
1 parent ffef9b8 commit d96c374

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/backend/tcop/pquery.c

Lines changed: 4 additions & 5 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.78 2004/05/26 04:41:35 neilc Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.79 2004/05/26 18:54:08 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -801,8 +801,8 @@ PortalRunMulti(Portal portal,
801801
DestReceiver *dest, DestReceiver *altdest,
802802
char *completionTag)
803803
{
804-
ListCell *planlist_item = list_head(portal->planTrees);
805804
ListCell *querylist_item;
805+
ListCell *planlist_item;
806806

807807
/*
808808
* If the destination is RemoteExecute, change to None. The reason is
@@ -823,13 +823,12 @@ PortalRunMulti(Portal portal,
823823
* Loop to handle the individual queries generated from a single
824824
* parsetree by analysis and rewrite.
825825
*/
826-
foreach(querylist_item, portal->parseTrees)
826+
forboth(querylist_item, portal->parseTrees,
827+
planlist_item, portal->planTrees)
827828
{
828829
Query *query = (Query *) lfirst(querylist_item);
829830
Plan *plan = (Plan *) lfirst(planlist_item);
830831

831-
planlist_item = lnext(planlist_item);
832-
833832
/*
834833
* If we got a cancel signal in prior command, quit
835834
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy