Hi Dave,

"catalogs" are the same as "databases" I think. Basically, typing \l at the  psql 
prompt will list them. The MySQL driver lists all the databases when getCatalogs() is 
called (by the way, Peter E has implemented it in DatabaseMetaData.getCatalogs() when 
I requested it - see CVS). I think maybe the name is just confusing?

Methods like Connection.getCatalog() should return the database which the driver is 
currently connected to. Connection.setCatalog(String database) should connect to the 
specified database. The DatabaseMetaData.supportsCatalogsInXXX() may need to be 
modified. 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?

The MySQL driver implements get/setCatalog() as well as getCatalogs(). Supporting 
catalogs is necessary for my database tool to list the databases available etc.


Jason Davies

[[[ Original Message from Dave Cramer <[EMAIL PROTECTED]> ]]]

> Jason,
> Catalogs are foreign to postgres, can you briefly explain what they are,
> and how you expect them to work
> Dave
> -----Original Message-----
> Sent: July 13, 2001 8:14 AM
> Subject: [JDBC] Connection.setCatalog()
> Why isn't setCatalog() implemented? This is similar to the
> DatabaseMetaData.getCatalogs() which I asked about recently. The MySQL
> driver supports it, no reason why we shouldn't.
> Jason Davies
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to