X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 058019DC847 for ; Fri, 30 Dec 2005 04:15:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07794-07 for ; Fri, 30 Dec 2005 04:15:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 7B0B59DC804 for ; Fri, 30 Dec 2005 04:15:39 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 5939F33A69; Fri, 30 Dec 2005 09:15:40 +0100 (MET) From: "Dmitry Samokhin" X-Newsgroups: pgsql.interfaces.odbc Subject: Table's Field Info Date: Fri, 30 Dec 2005 11:15:39 +0300 Organization: MNPP Saturn Lines: 27 Message-ID: Reply-To: "Dmitry Samokhin" X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original To: pgsql-odbc@postgresql.org 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: 200512/336 X-Sequence-Number: 6815 Working in the following environment: Borland VCL ADO Components -> Microsoft OLE DB Provider for ODBC Drivers -> PostgreSQL ODBC Driver -> PostgreSQL Server and executing SQL statements like this: SELECT * FROM mytable WHERE ... I was surprised the driver issues the statement "SELECT * FROM mytable" just before executing my custom statement. I guess it tries to retreive the field info for "mytable". But what if "mytable" contains mios of rows?! The execution will continue forever... Yes, I am aware of the option "Disallow Premature". But my Borland TADOQuery object crashes on begin;declare cursor .. for select ...;fetch backward in ..;close ..;commit (unexpected EOF of client connection) I think this is the easiest way to get no row but the field info: SELECT * FROM mytable WHERE 0=1 Isn't it?