Re: Connection.setCatalog method

From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: "Philip A(dot) Chapman" <pchapman(at)pcsw(dot)us>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection.setCatalog method
Date: 2003-08-05 18:33:10
Message-ID: 3F2FF866.6020206@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Yes, setCatalog() should switch the connection to another database (it
can only be ignored if the driver does not support catalogs, which is
not the case).

I have no idea why that patch was not applied. Could not find anything
after the thread you've pointed to.

Regards,
Fernando

Philip A. Chapman wrote:
> Everyone,
>
> I am working on yet another database administration application. I have
> run into some issues because the JDBC implementation of
> Connection.setCatalog()
> (org.postgresq.jdbc1.AbstractJdbc1Connection.java) does nothing when
> setCatalog() is called. My understanding is that doing nothing is
> allowed by the JDBC specification, but this is somewhat confusing as
> getCatalog() returns a value and DatabaseMetaData.getCatalogs() returns
> a list of values.
>
> While searching though this list's archives, I found a thread from July
> of 2001 that deals with this subject. Toward the end of the thread, it
> appears as though it was decided that the setCatalog() functionallity
> should be implemented and that a patch was to be accepted to make this
> happen:
>
> http://archives.postgresql.org/pgsql-jdbc/2001-07/msg00150.php
>
> What has become of this? Can someone shed some light on why
> Connection.getCatalog and DatabaseMetaData.getCatalogs() work, but
> Connection.setCatalog does not?

--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Felipe Schnack 2003-08-05 19:04:46 setFetchSize() bug
Previous Message Anders Hermansen 2003-08-05 18:00:20 Re: JDBC encoding problem