pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Liam Stewart <liams@redhat.com>
To: pgsql-jdbc@postgresql.org
Subject: DatabaseMetaData
Date: Fri, 10 Aug 2001 11:07:45 -0400
Message-ID: <20010810110745.A1671@redhat.com> (raw)


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@redhat.com



view thread (11+ messages)  latest in thread

Message-ID: <20010810110745.A1671@redhat.com>
Permalink:  ../20010810110745.A1671@redhat.com/
Also on:    postgresql.org/message-id/20010810110745.A1671@redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: liams@redhat.com
  Subject: Re: DatabaseMetaData
  In-Reply-To: <20010810110745.A1671@redhat.com>
  References: <20010810110745.A1671@redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox