I've attached some sample code, the script I use for creating the database,
and the output when I run it here:
I am sorry, but I didn't notice the Null Pointer Exception being produced
by the getIndexInfo method. It doesn't seem to matter whether I supply a
table name, schema name or catalog name, I always get the exception.
Thanks for the info on where to get the souurce code and the JDBC
compliance URL. I'll follow these up when I get time.
From: Rene Pijlman [SMTP:rene(at)lab(dot)applinet(dot)nl]
Sent: 07 September 2001 09:13
To: Tom Falconer
Subject: Re: [JDBC] DatabaseMetadata problems
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
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.
Rene Pijlman <rene(at)lab(dot)applinet(dot)nl>
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
Description: text/plain (20.2 KB)
Description: application/octet-stream (922 bytes)
Description: application/octet-stream (2.9 KB)
pgsql-jdbc by date
|Next:||From: Bruce Momjian||Date: 2001-09-07 21:25:19|
|Subject: Re: driver source code indentation|
|Previous:||From: Barry Lind||Date: 2001-09-07 16:26:17|
|Subject: Re: [HACKERS] JDBC pg_description update needed for CVS tip|