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

Re: DatabaseMetadata problems

From: Rene Pijlman <rene(at)lab(dot)applinet(dot)nl>
To: Tom Falconer <tom_falconer(at)lineone(dot)net>
Cc: "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: DatabaseMetadata problems
Date: 2001-09-07 08:12:39
Message-ID: o6vgptkl03ifd8gmdns65i7o71bra85kh3@4ax.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
On Thu, 6 Sep 2001 22:30:58 +0100, you wrote:
>The problems are:
>1. No Index information from the getIndexInfo method

Hmmm... looking at the source, it apppears that
DatabaseMetaData.getIndexInfo() is implemented. If it doesn't
work for you, we would need more information about the problem
to be able to fix it.

>2. Indexes included as tables in getTables

Again, can you provide us with more detailed information about
the problem? A small test case would be nice, which creates a
few tables and indexes and shows incorrect output.

>3. Only one column in the entire database is returned in getColumns

getColumns() was fixed recently. It returned only columns with a
comment (IIRC). This should be fixed in release 7.2.

>4. The catalog name is not returned in getTables

The PostgreSQL driver intentionally ignores the catalog
parameter of the metadata methods, and it returns null for the
catalog in the metadata it returns.

I don't know if this could be implemented and how. Also, any
interpretation of this concept we come up with has to be
consistent with the backend's understanding of the SQL
standard's concept 'catalog'.

Reading the book "Understanding the SQL standard" it seems that
what the standard calls a schema is a database in PostgreSQL. A
catalog is a set of schemas. Following the standard, a session
is supposed to have access to a catalog, but in PostgreSQL it
has access to a database.

Perhaps this feature has not yet been implemented because of
such fundamental mapping problems.

>5. Comment columns contain 'No Comment' instead of null

That was fixed recently in getTables(), getColumns() and
getProcedures(). The fix wil appear in release 7.2.

>Where are the sources, as I am willing to take a look at them to 
>try at least identify the problems in more detail

http://developer.postgresql.org/

I would also like to point you to our JDBC compliance effort:
http://lab.applinet.nl/postgresql-jdbc/. However, the
DatabaseMetaData section is still very much under construction. 

I'll be glad to document any deviations of the standard you may
find (please post new issues on this list). Since this is a
volunteer open source project, we cannot guarantee if and when
the problems will be fixed.

Regards,
René Pijlman <rene(at)lab(dot)applinet(dot)nl>

In response to

Responses

pgsql-jdbc by date

Next:From: Rene PijlmanDate: 2001-09-07 08:15:01
Subject: Re: [HACKERS] JDBC pg_description update needed for CVS tip
Previous:From: Tony GrantDate: 2001-09-07 07:23:31
Subject: Re: Why JDBC 1?

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