Skip site navigation (1) Skip section navigation (2)

Table's Field Info

From: "Dmitry Samokhin" <sdld(at)mail(dot)ru>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Table's Field Info
Date: 2005-12-30 08:15:39
Message-ID: dp2qb7$1imf$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-odbc
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?





Responses

pgsql-odbc by date

Next:From: noreplyDate: 2006-01-02 11:57:39
Subject: [ psqlodbc-Bugs-1000514 ] Conexo ADO
Previous:From: noreplyDate: 2005-12-29 21:39:21
Subject: [ psqlodbc-Bugs-1000507 ] MSSQL syntax

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group