From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Gerhard Hintermayer <g.hintermayer@inode.at>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: pg_exec not returning after 16 calls/ libpgtcl
Date: Sun, 22 Sep 2002 21:42:59 -0400 (EDT)
Message-ID: <200209230142.g8N1gxP17432@candle.pha.pa.us> (raw)
In-Reply-To: <bd4db85f.0209190227.386c458d@posting.google.com>
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
Attachments:/bjm/diff (text/plain, 636B) download
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;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: pgman@candle.pha.pa.us, g.hintermayer@inode.at
Subject: Re: pg_exec not returning after 16 calls/ libpgtcl
In-Reply-To: <200209230142.g8N1gxP17432@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox