X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1A0B9D1B560 for ; Wed, 1 Oct 2003 16:40:52 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 70513-10 for ; Wed, 1 Oct 2003 13:40:05 -0300 (ADT) Received: from ohsmtp02.ogw.rr.com (ohsmtp02.ogw.rr.com [65.24.7.37]) by svr1.postgresql.org (Postfix) with ESMTP id 8A96FD1B52B for ; Wed, 1 Oct 2003 13:39:21 -0300 (ADT) Received: from corvette.mascari.com (uar225045.columbus.rr.com [204.210.225.45]) by ohsmtp02.ogw.rr.com (8.12.10/8.12.2) with ESMTP id h91GdGI5021090; Wed, 1 Oct 2003 12:39:17 -0400 (EDT) Received: from mascari.com (ferrari.mascari.com [192.168.2.1]) by corvette.mascari.com (8.11.6/8.11.6) with ESMTP id h91GcvC19246; Wed, 1 Oct 2003 12:38:57 -0400 Message-ID: <3F7B0321.9010202@mascari.com> Date: Wed, 01 Oct 2003 12:38:57 -0400 From: Mike Mascari User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben Trewern Cc: pgsql-odbc@postgresql.org Subject: Re: FUD!! ODBC will not be supported by Microsoft in the future References: In-Reply-To: X-Enigmail-Version: 0.74.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-MailScanner: Found to be clean X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/16 X-Sequence-Number: 3329 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