pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_exec not returning after 16 calls/ libpgtcl
2+ messages / 2 participants
[nested] [flat]
* pg_exec not returning after 16 calls/ libpgtcl
@ 2002-09-19 10:27 Gerhard Hintermayer <g.hintermayer@inode.at>
0 siblings, 1 reply; 2+ messages in thread
From: g.hintermayer@inode.at @ 2002-09-19 10:27 UTC (permalink / raw)
To: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pg_exec not returning after 16 calls/ libpgtcl
@ 2002-09-23 01:42 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Gerhard Hintermayer <g.hintermayer@inode.at>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2002-09-23 01:42 UTC (permalink / raw)
To: Gerhard Hintermayer <g.hintermayer@inode.at>; +Cc: pgsql-interfaces
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;
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-09-23 01:42 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-19 10:27 pg_exec not returning after 16 calls/ libpgtcl Gerhard Hintermayer <g.hintermayer@inode.at>
2002-09-23 01:42 ` Bruce Momjian <pgman@candle.pha.pa.us>
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