From: Dmitry Samokhin <sdld@mail.ru>
To: pgsql-odbc@postgresql.org
Subject: Table's Field Info
Date: Fri, 30 Dec 2005 11:15:39 +0300
Message-ID: <dp2qb7$1imf$1@news.hub.org> (raw)
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?
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: sdld@mail.ru
Subject: Re: Table's Field Info
In-Reply-To: <dp2qb7$1imf$1@news.hub.org>
References: <dp2qb7$1imf$1@news.hub.org>
* 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