> Connection.setCatalog(String database) should connect to the specified database.

The JDBC spec says:

: Sets a catalog name in order to select a subspace of this Connection's
: database in which to work. If the driver does not support catalogs, it
: will silently ignore this request.

Note the part about "subspace".  In PostgreSQL, the database/catalog is
fixed when the connection is established.  On other systems you can
probably change the database/catalog while keeping the connection.  But
you cannot establish a new connection if the spec says that this method
should make a selection among the objects available in the current

> The DatabaseMetaData.supportsCatalogsInXXX() may need to be modified.

These methods are all implemented correctly.

> I'm not sure about the stuff in DatabaseMetaData.getTables() for
> example - at the moment specifying null gets all the tables in the
> database which the driver is currently connected to. I think this is
> fine - but different database name patterns might be specified and
> they may have to be implemented?

Yup.  We'll just throw an SQLException in that case.

Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Reply via email to