88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.78 2004/05/2604:41:35 neilc Exp $
11+ * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.79 2004/05/2618:54:08 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -801,8 +801,8 @@ PortalRunMulti(Portal portal,
801801DestReceiver * dest ,DestReceiver * altdest ,
802802char * completionTag )
803803{
804- ListCell * planlist_item = list_head (portal -> planTrees );
805804ListCell * 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{
828829Query * query = (Query * )lfirst (querylist_item );
829830Plan * 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 */