Re: pg_exec not returning after 16 calls/ libpgtcl

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: pg_exec not returning after 16 calls/ libpgtcl
Дата
Msg-id
200209230142.g8N1gxP17432@candle.pha.pa.us
Ответ на
pg_exec not returning after 16 calls/ libpgtcl (g.hintermayer@inode.at (Gerhard Hintermayer))
Список
Дерево обсуждения
pg_exec not returning after 16 calls/ libpgtcl g.hintermayer@inode.at (Gerhard Hintermayer)
Re: pg_exec not returning after 16 calls/ libpgtcl Bruce Momjian <pgman@candle.pha.pa.us>

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
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;
В списке pgsql-interfaces по дате отправления
От: Adam Witney
Дата:
Сообщение: Re: Connecting R to PostgreSQL
От: Recto, Angelo
Дата:
FAQ