On 3/31/2011 8:50 AM, DI Martin Handsteiner wrote:

thank you very much for your fast response.

The problem with the current implementation of acceptsURL in the the
postgres driver is, that it also returns true if the connection url is like:

jdbc:oraclethin:......
jdbc:hsqldb:......

That is the reason, why connections to other databases than postgres are not
possible, if you use also a postgres driver.

I understand what your problem description is now, but I'm not seeing that in a simple test case here. Can you provide the actual URLs that make the attached code accept a non-postgresql URL?

Kris Jurka
import java.sql.Driver;

public class Conn {

	public static void main(String args[]) throws Exception {
		String urls[] = {
			"jdbc:xx:postgresql",
			"jdbc:xx:postgresql:xx",
			"jdbc:xx:xx:postgresql",
			"jdbc:hsqldb:.....",
			"jdbc:oraclethin:..."

		};

		Driver driver = new org.postgresql.Driver();
		for (String url : urls) {
			System.out.println(url + " = " + driver.acceptsURL(url));
		}
	}
}

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to