Re: Table's Field Info

From: Ludek Finstrle <luf(at)pzkagis(dot)cz>
To: Dmitry Samokhin <sdld(at)mail(dot)ru>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Table's Field Info
Date: 2006-01-02 19:46:34
Message-ID: 20060102194634.GA13977@soptik.pzkagis.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello,

> Working in the following environment:
>
> Borland VCL ADO Components -> Microsoft OLE DB Provider for ODBC Drivers ->
> PostgreSQL ODBC Driver -> PostgreSQL Server

We need more :-) What about psqlODBC version? What's datasource setings?

> 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

I'm not familiar with this part of code. And I don't have enough time
until end of week.

> 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)

How can we fast reproduce your problem? Could you post mylog output?
It's ideal to post one mylog with "SELECT * FROM mytable" and second
one with crash. Or you could post me example source or executable with
data specification.

> I think this is the easiest way to get no row but the field info:
>
> SELECT * FROM mytable WHERE 0=1
>
> Isn't it?

Are you sure PgSQL handle specially this kind of query? I remember Tom
Lane wrote in another mail list that this isn't as fast as you think.
But it is some time ago so it could be handled better now.

I hope Tom or someone else who knows it will drop here a note.

I think it could be better to use LIMIT. But is it same with
joins or more complex queries? Doesn't LIMIT breake it?

Regards,

Luf

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message noreply 2006-01-02 20:23:45 [ psqlodbc-Bugs-1000510 ] Access the rdoResultsets column is NULL in the second access
Previous Message noreply 2006-01-02 19:14:07 [ psqlodbc-Bugs-1000514 ] Conexo ADO