Re: [INTERFACES] Re: Possible bugs in ODBC driver

From: Hannu Krosing <hannu(at)trust(dot)ee>
To: Byron Nikolaidis <byronn(at)insightdist(dot)com>
Cc: Dario Fumagalli <dfumagalli(at)art-media(dot)it>, "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] Re: Possible bugs in ODBC driver
Date: 1998-04-17 09:46:16
Message-ID: 353724E8.C518E4DF@sid.trust.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Byron Nikolaidis wrote:
>
> Dario Fumagalli wrote:
>
> > But... there are some glitches we had not with the previous drivers
> > (neither 0.21 nor 0.3x):
> >
> > 1) There is a minor glitch that (at least under Borland C++ Builder
> > Professional 3.0 + BDE 4.1) causes the metadata of the last table to appear
> > duplicated (if you like I can send you a screen shot). I.e. if I have a
> > database with the following three tables:
> >
> > - customers
> > - orders
> > - order_details
> >
> > The DatabaseExplorer utility Borland gives you to quickly manage tables
> > using SQL (it is like the psql shell in Unix), tells you the database has
> > the following structure:
> >
> > - customers
> > - orders
> > - order_details
> > - order_details
> >
> > with the last entry (and its fields, indexes and so on...) repeated twice.
> > We can see this problem on all our databases. It seems to be some sort of
> > linked list problem. This problem never appeared using the old drivers.
> >
>
> We have had this problem inhouse, and maybe it is possible that you have it.
> The SQLTables() function in the driver does a query very similar to a '\d' in
> the psql (you might want to try that and see if you get the same problem). The
> query is:
>
> select relname, usename from pg_class, pg_user where relkind = 'r'
> and relname !~ '^xinv[0-9]+' and int4out(usesysid) = int4out(relowner) order by
> relname;
>
> If the relowner does not match the usesysid for all relations, you will get
> multiple entries.
> Maybe we could change the above query to use "distinct" to prevent this.

Maybe, but probably not. I remember taht the old driver used to exhibit
this behaviour for all queries that were issued from Borland products
(i.e. using BDE). Then somebody patched it and it disappeared.

So my guess is that it has creeped back in to the part where tables are
listed. It probably has nothing to do with the actual query returning
duplicate rows.

I don't remember exactly what caused it, but it was an PostODBC/BDE
interaction problem and not a case of the query returning wrong
arguments. Notice that the repeated one is always the last.

OTOH, I may be entirely wrong, as I have not tried to use it with
Borland stuff for more than a year. (but I will try again shortly).

Hannu

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Antonio Garcia Mari 1998-04-17 10:47:29 ODBC Driver and password auth.
Previous Message Dario Fumagalli 1998-04-17 09:46:08 Re: Possible bugs in ODBC driver