Re: Declare/Fetch

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Johann Zuschlag" <zuschlag2(at)online(dot)de>, <anoopk(at)pervasive-postgres(dot)com>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Declare/Fetch
Date: 2005-11-02 13:10:11
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4CC3886@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

> -----Original Message-----
> From: Johann Zuschlag [mailto:zuschlag2(at)online(dot)de]
> Sent: 02 November 2005 13:02
> To: Dave Page; anoopk(at)pervasive-postgres(dot)com;
> pgsql-odbc(at)postgresql(dot)org
> Subject: Declare/Fetch
>
> Hi Dave, hi Anoop,

Hi Johann,

Unfortunately Anoop et al. are out for a few days, so I'm desperately
trying to understand and fix this before 8.1 :-(

> In qresult.c you still find:
>
> 515 if (fetch_count < fetch_count)
>
> Declare/Fetch will not work without changing that, i.e. just
> fetch one line.
>
> 515 if (fetch_count < num_backend_rows)
> (Dave's proposal)
>
> seems to be a better choice.

Updated in my local copy (thanks) - unfortunately not a fix to the bug
reported by Marko.

I have narrowed it down some more though - it's not so much a colwise
issue, as a bind issue. You can see it with the following:

1) Set cache size to 2 and enable Declare/Fetch
2) Connect
3) SQLExecDirect "SELECT relname FROM pg_class"
4) Bind to column 1
5) SQLFetch
6) SQLFetch
7) SQLFetch *bang* :-)

I'm largely unfamiliar with this part of the code so any help would be
appreciated. FWIW, the bug seems to be libpq version specific - it's
certainly not in 07.xx.

Regards, dave

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Leendert Paul Diterwich 2005-11-02 14:33:27 ERROR [HY000] Out of memory while reading tuples.
Previous Message Johann Zuschlag 2005-11-02 13:01:36 Declare/Fetch