Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 94C85475458 for ; Sun, 22 Sep 2002 21:43:08 -0400 (EDT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 9F672475C2B for ; Sun, 22 Sep 2002 21:43:06 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g8N1gxP17432; Sun, 22 Sep 2002 21:42:59 -0400 (EDT) From: Bruce Momjian Message-Id: <200209230142.g8N1gxP17432@candle.pha.pa.us> Subject: Re: pg_exec not returning after 16 calls/ libpgtcl In-Reply-To: To: Gerhard Hintermayer Date: Sun, 22 Sep 2002 21:42:59 -0400 (EDT) Cc: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM1032745379-16222-0_ Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/65 X-Sequence-Number: 3126 --ELM1032745379-16222-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII I assume the attached patch is what you are suggesting. Applied. --------------------------------------------------------------------------- Gerhard Hintermayer wrote: > Sorry if posted twice, got not confirmation about posting from google. > > Obviously noone has ever tested the doubling of availiable result ids > up to > reaching the hard limit. After opening 16(=current REST_START value) > results via pg_exec, the next pg_exec tries to find an empty slot > forever :-( . In PgSetResultId file pgtclId.c in the for loop there > has to be done a break, if res_max ist reached. The piece of code > should look like > if (resid == connid->res_max) > { > resid = 0; > break; /* the break as to be added */ > } > > now everything works (double available results after reaching > RES_START up to reaching RES_HARD_MAX) > > PS: sorry, posting via Google, so no attached diff available > > regards > > Gerhard Hintermayer > http://www.inode.at/g.hintermayer > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 --ELM1032745379-16222-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/bjm/diff" Index: src/interfaces/libpgtcl/pgtclId.c =================================================================== RCS file: /cvsroot/pgsql-server/src/interfaces/libpgtcl/pgtclId.c,v retrieving revision 1.35 diff -c -c -r1.35 pgtclId.c *** src/interfaces/libpgtcl/pgtclId.c 4 Sep 2002 20:31:46 -0000 1.35 --- src/interfaces/libpgtcl/pgtclId.c 23 Sep 2002 01:41:42 -0000 *************** *** 343,349 **** --- 343,352 ---- for (resid = connid->res_last + 1; resid != connid->res_last; resid++) { if (resid == connid->res_max) + { resid = 0; + break; + } if (!connid->results[resid]) { connid->res_last = resid; --ELM1032745379-16222-0_--