From: Kris Jurka <books@ejurka.com>
To: DI Martin Handsteiner <martin.handsteiner@sibvisions.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5961: JDBC Driver acceptURL does not check 'jdbc:postgresql:'
Date: Thu, 31 Mar 2011 12:45:43 -0700
Message-ID: <4D94D9E7.6080807@ejurka.com> (raw)
In-Reply-To: <002d01cbefbb$4c6f8190$e54e84b0$@handsteiner@sibvisions.com>
References: <201103311309.p2VD9E8o097110@wwwmaster.postgresql.org>
<alpine.BSO.2.00.1103311056470.25650@leary.csoft.net>
<002d01cbefbb$4c6f8190$e54e84b0$@handsteiner@sibvisions.com>
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
Attachments:Conn.java (text/x-java, 406B) download
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));
}
}
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: books@ejurka.com, martin.handsteiner@sibvisions.com
Subject: Re: BUG #5961: JDBC Driver acceptURL does not check 'jdbc:postgresql:'
In-Reply-To: <4D94D9E7.6080807@ejurka.com>
References: <201103311309.p2VD9E8o097110@wwwmaster.postgresql.org> <alpine.BSO.2.00.1103311056470.25650@leary.csoft.net> <002d01cbefbb$4c6f8190$e54e84b0$@handsteiner@sibvisions.com> <4D94D9E7.6080807@ejurka.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox