From: | Tom Falconer <tom_falconer(at)lineone(dot)net> |
---|---|
To: | "'Rene Pijlman'" <rene(at)lab(dot)applinet(dot)nl> |
Cc: | "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: DatabaseMetadata problems |
Date: | 2001-09-07 20:43:26 |
Message-ID: | 01C137E6.38FD1380.tom_falconer@lineone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Rene,
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.
Regards,
Tom
Tom_Falconer(at)lineone(dot)net
-----Original Message-----
From: Rene Pijlman [SMTP:rene(at)lab(dot)applinet(dot)nl]
Sent: 07 September 2001 09:13
To: Tom Falconer
Cc: 'pgsql-jdbc(at)postgresql(dot)org'
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
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,
Rene Pijlman <rene(at)lab(dot)applinet(dot)nl>
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
Attachment | Content-Type | Size |
---|---|---|
testbed.txt | text/plain | 20.2 KB |
psql_schema.sql | application/octet-stream | 922 bytes |
TestBed.java | application/octet-stream | 2.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-09-07 21:25:19 | Re: driver source code indentation |
Previous Message | Barry Lind | 2001-09-07 16:26:17 | Re: [HACKERS] JDBC pg_description update needed for CVS tip |