diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-05-26 18:54:08 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-05-26 18:54:08 +0000 |
commit | d96c374648974d29a33a0c7033a05adb6ae114aa (patch) | |
tree | d31307c1a587ff1f83463c92a2303e0f46d25326 /src | |
parent | ffef9b8c50174c2af19dae914e25c62d0cd529d6 (diff) | |
download | postgresql-d96c374648974d29a33a0c7033a05adb6ae114aa.tar.gz postgresql-d96c374648974d29a33a0c7033a05adb6ae114aa.zip |
Use new forboth() macro to make loop coding a bit clearer.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/tcop/pquery.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index 2608588234c..e79c58f7025 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.78 2004/05/26 04:41:35 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.79 2004/05/26 18:54:08 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -801,8 +801,8 @@ PortalRunMulti(Portal portal, DestReceiver *dest, DestReceiver *altdest, char *completionTag) { - ListCell *planlist_item = list_head(portal->planTrees); ListCell *querylist_item; + ListCell *planlist_item; /* * If the destination is RemoteExecute, change to None. The reason is @@ -823,13 +823,12 @@ PortalRunMulti(Portal portal, * Loop to handle the individual queries generated from a single * parsetree by analysis and rewrite. */ - foreach(querylist_item, portal->parseTrees) + forboth(querylist_item, portal->parseTrees, + planlist_item, portal->planTrees) { Query *query = (Query *) lfirst(querylist_item); Plan *plan = (Plan *) lfirst(planlist_item); - planlist_item = lnext(planlist_item); - /* * If we got a cancel signal in prior command, quit */ |