X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4EACDD81B3 for ; Tue, 6 Sep 2005 11:52:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86641-02 for ; Tue, 6 Sep 2005 14:52:02 +0000 (GMT) Received: from fep32-app.kolumbus.fi (fep32-0.kolumbus.fi [193.229.0.63]) by svr1.postgresql.org (Postfix) with ESMTP id 968BDD8080 for ; Tue, 6 Sep 2005 11:51:59 -0300 (ADT) Received: from [192.168.1.101] (really [80.186.85.167]) by fep32-app.kolumbus.fi with ESMTP id <20050906145203.DDQU13434.fep32-app.kolumbus.fi@[192.168.1.101]>; Tue, 6 Sep 2005 17:52:03 +0300 Message-ID: <431DAD14.6070601@kolumbus.fi> Date: Tue, 06 Sep 2005 17:52:04 +0300 From: Marko Ristola User-Agent: Debian Thunderbird 1.0.2 (X11/20050817) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Page Cc: pgsql-odbc@postgresql.org, Anoop Kumar Subject: Critical Bug with UseDeclareFetch in development version References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.114 required=5 tests=[AWL=0.064, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/68 X-Sequence-Number: 5966 There is one inconvinient bug in the driver: I tested this with the very least CVS version, so it exists. psql > select * from test1; (104 rows) isql marko XXX 2 rows returned So I get the above result by configuring .odbc.ini: [marko] Fetch = 2 UseDeclareFetch = 1 So unfortunately it fetches too few rows. Old behaviour: 1. SELECT * from test1 with cursor STM7737819 2. While more rows; do Fetch at most 2 rows; done 3. CLOSE CURSOR maybe with STMT_DROP. So this hack was implemented to support SELECT * of more than a few million rows. So without this hack, with 32 bit operating systems, query results are limited into maybe 8 million rows, before memory allocation failure. I don't remember the exact number of millions. Of course the exact million depends heavily with the result row width and with the Operating system memory architecture. So, it seems that the hack implementation has been partially removed, but it is still active. Regards, Marko Ristola