Skip site navigation (1) Skip section navigation (2)

Re: pg_exec not returning after 16 calls/ libpgtcl

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gerhard Hintermayer <g(dot)hintermayer(at)inode(dot)at>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: pg_exec not returning after 16 calls/ libpgtcl
Date: 2002-09-23 01:42:59
Message-ID: 200209230142.g8N1gxP17432@candle.pha.pa.us (view raw or flat)
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-interfaces by date

Next:From: Recto, AngeloDate: 2002-09-24 06:10:16
Subject: question on pgaccess installation
Previous:From: Adam WitneyDate: 2002-09-20 13:18:10
Subject: Re: Connecting R to PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group