From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | <jason(at)netspade(dot)com> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | RE: Connection.setCatalog() |
Date: | 2001-07-13 16:42:12 |
Message-ID: | Pine.LNX.4.30.0107131835350.677-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
jason(at)netspade(dot)com writes:
> 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
connection.
> 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 peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2001-07-13 16:44:58 | Re: Not yet implemented? |
Previous Message | Peter Eisentraut | 2001-07-13 16:30:58 | Re: Not yet implemented? |