DatabaseMetaData

From: Liam Stewart <liams(at)redhat(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: DatabaseMetaData
Date: 2001-08-10 15:07:45
Message-ID: 20010810110745.A1671@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


I've taken a look at the results of the dbMeta tests in the JDBC test
suite. I know that Peter has taken a look at these so I've just got some
additional notes w.r.t. to failures.

In dbMeta1, the test for supportsStoredProcedures fails consistently.
The method returns false, but the test harness is expecting true and
considers false to be an invalid response. The reason for this is that
the JDBC test suite is doing tests for J2EE compliance of the JDBC
driver being tested, and one of the conditions is that
supportsStoredProcedures should always return true. For regular JDBC
compliance, returning false is alright. So, ignore those tests (unless
we want the JDBC driver to be J2EE compliant).

In the PostgreSQL driver, there are some methods that throw
SQLExceptions because they are not implemented yet (isCatalogAtStart,
getCatalogSeparator, getUDTs). But other unimplemented methods, such as
getTablePrivileges, getVersionColumns, getExportedKeys, and
getCrossReference return null. Until they are implemented, they should
throw an SQLException.

null != empty ResultSet, so getTypeInfo should not have a fallback
return value of null, but rather should throw an SQLException when the
metadata is not available. In general, I think that better checking for
unavailable metadata can be done.

The SQLExceptions thrown by unimplemented methods will be caught by the
JDBC test harness and the tests will be flagged as errors due to the
fact, again, that the test suite is testing for J2EE compliance: all
methods should be implemented and none should throw exceptions. For more
information on the JDBC and J2EE, see the J2EE Api, section 6.2.2.3.

Liam

--
Liam Stewart :: Red Hat Canada, Ltd. :: liams(at)redhat(dot)com

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2001-08-10 16:36:50 Re: Re: JDBC 2.0 conformance, documentation and todo list
Previous Message Peter Eisentraut 2001-08-10 15:07:04 Re: Re: JDBC 2.0 conformance, documentation and todo list