From: | jason(at)netspade(dot)com |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | RE: Connection.setCatalog() |
Date: | 2001-07-13 15:11:55 |
Message-ID: | 3916375.995037115614.JavaMail.jason@www2.kc.aoindustries.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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.
Thanks,
Jason Davies
jason(at)netspade(dot)com
[[[ Original Message from Dave Cramer <dave(at)fastcrypt(dot)com> ]]]
> Jason,
>
> Catalogs are foreign to postgres, can you briefly explain what they are,
> and how you expect them to work
>
> Dave
>
> -----Original Message-----
> From: pgsql-jdbc-owner(at)postgresql(dot)org
> [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of jason(at)netspade(dot)com
> 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
> jason(at)netspade(dot)com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2001-07-13 15:24:01 | RE: alternative jdbc |
Previous Message | Tony Grant | 2001-07-13 15:11:46 | RE: alternative jdbc |