pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Mascari <mascarm@mascari.com>
To: Ben Trewern <ben_trewern@hotmail.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: FUD!! ODBC will not be supported by Microsoft in the future
Date: Wed, 01 Oct 2003 12:38:57 -0400
Message-ID: <3F7B0321.9010202@mascari.com> (raw)
In-Reply-To: <BAY8-F623T4nwFYHwPV00003aae@hotmail.com>
References: <BAY8-F623T4nwFYHwPV00003aae@hotmail.com>

Ben Trewern wrote:

> I've been using (or trying to use) the pgODBC driver with 'Use
> Declare/Fetch' set to true and all goes well till you try to go to
> the end of a large recordset.  The driver seems to load all the
> records instead of just the last 50 (or whatever).  I'm using Delphi
> 7, BDE and psqlODBC version 7.03.01.08 to connect to Postgres 7.3.1.
>
> Any ideas?  Could this be a BDE problem?  Any one else out there
> using this configuration?

and

> If you look in the pg 7.3 docs it seems to state that FETCH can fetch
> backwards.  Does this mean that the backend needs to materialize the
> whole recordset but could return just the last n records to the client? 
> If so then that would be different than the current psqlODBC state of
> affairs and would be a net gain as it would reduce network traffic.
> 
> Any thoughts?
> 
> Ben

Well, looking at the ODBC sources shows that it is capable of using
DECLARE/FETCH to move to the end the record set. PostgreSQL will still
have to materialize the result set on the backend, of course. So I'd
suggest performing an ODBC trace to see which ODBC API functions are
being called on the client side and also turn logging on in
postgresql.conf to see what the queries look like on the server.

ODBC provides access to cursor operations through the use of
SQLFetch(), which is a forward-only cursor and SQLFetchScroll() which
is scroll-capable. Perhaps Delphi 7 is using SQLFetch() instead of
SQLFetchScroll()? The ODBC trace will tell.

Mike Mascari
mascarm@mascari.com






view thread (34+ messages)  latest in thread

Message-ID: <3F7B0321.9010202@mascari.com>
Permalink:  ../3F7B0321.9010202@mascari.com/
Also on:    postgresql.org/message-id/3F7B0321.9010202@mascari.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: mascarm@mascari.com, ben_trewern@hotmail.com
  Subject: Re: FUD!! ODBC will not be supported by Microsoft in the future
  In-Reply-To: <3F7B0321.9010202@mascari.com>
  References: <BAY8-F623T4nwFYHwPV00003aae@hotmail.com> <3F7B0321.9010202@mascari.com>

* 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