On Tue, 2005-02-01 at 01:53 -0500, Tom Lane wrote:
> /*
> * Increment command counter between queries, but not after the
> * last one.
> */
> if (planlist_item != NULL)
> CommandCounterIncrement();
>
> but planlist_item will *never* be NULL here. Should be testing
> lnext(planlist_item), I think. Neil?
Indeed :( One-liner attached, and applied to HEAD and REL8_0_STABLE.
-Neil
Index: src/backend/tcop/pquery.c
===================================================================
RCS file: /var/lib/cvs/pgsql/src/backend/tcop/pquery.c,v
retrieving revision 1.89
diff -c -r1.89 pquery.c
*** src/backend/tcop/pquery.c 31 Dec 2004 22:01:16 -0000 1.89
--- src/backend/tcop/pquery.c 1 Feb 2005 23:11:40 -0000
***************
*** 1033,1039 ****
* Increment command counter between queries, but not after the
* last one.
*/
! if (planlist_item != NULL)
CommandCounterIncrement();
/*
--- 1033,1039 ----
* Increment command counter between queries, but not after the
* last one.
*/
! if (lnext(planlist_item) != NULL)
CommandCounterIncrement();
/*
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly