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 F406AD79CF for ; Sun, 27 Nov 2005 18:01:22 -0400 (AST) 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 35597-06 for ; Sun, 27 Nov 2005 18:01:23 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp.pzkagis.cz (gis6.netbox.cz [83.240.30.214]) by svr1.postgresql.org (Postfix) with ESMTP id ECF06D7065 for ; Sun, 27 Nov 2005 18:01:15 -0400 (AST) Received: (from luf@localhost) by smtp.pzkagis.cz (8.11.6/8.11.6) id jARM19P21831; Sun, 27 Nov 2005 23:01:09 +0100 Date: Sun, 27 Nov 2005 23:01:09 +0100 From: Ludek Finstrle To: Miguel Juan Cc: Dave Page , pgsql-odbc@postgresql.org Subject: Re: psqlOdbc Ansi + BDE issues Message-ID: <20051127220109.GA21801@soptik.pzkagis.cz> References: <001001c5f047$e64e90e0$07c8a8c0@Miguel> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: <001001c5f047$e64e90e0$07c8a8c0@Miguel> User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/226 X-Sequence-Number: 6462 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, > the problem is produced by the 'Use declare fetch' option. If it > is unchecked the SQL explorer works OK. Otherwise, if it's checked > each table appears a few times, depending on the number of tables > in the database. Not so exactly. It depend on the number of tables _and_ cache size parametr. The problem is in fetching all rows in PGAPI_Tables but excepting only "cache size" entries in PGAPI_ExtendedFetch. I attach one line patch. Try it and report next problems. Best regards, Luf --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="psqlodbc-tables.diff" diff -c psqlodbc.orig\statement.c psqlodbc\statement.c *** psqlodbc.orig\statement.c Wed Nov 09 16:26:07 2005 --- psqlodbc\statement.c Sun Nov 27 23:45:24 2005 *************** *** 1061,1070 **** mylog("type = %d\n", type); if (self->manual_result) ! { ! if (ci->drivers.use_declarefetch) ! value = QR_get_value_manual(res, (self->currTuple >= ci->drivers.fetch_max) ? (self->currTuple % ci->drivers.fetch_max) : self->currTuple, lf); ! else value = QR_get_value_manual(res, self->currTuple, lf); mylog("manual_result\n"); } --- 1061,1073 ---- mylog("type = %d\n", type); if (self->manual_result) ! { ! ! if ((ci->drivers.use_declarefetch) && (self->currTuple >= QR_get_num_total_tuples(res))) ! value = QR_get_value_manual(res, (self->currTuple >= ci->drivers.fetch_max) ? (self->currTuple % ci->drivers.fetch_max) : self->currTuple, lf); ! ! else ! value = QR_get_value_manual(res, self->currTuple, lf); mylog("manual_result\n"); } --x+6KMIRAuhnl3hBn--