Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 45EA51337BEC for ; Thu, 31 Mar 2011 16:46:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 02719-04 for ; Thu, 31 Mar 2011 19:46:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 152CA1337BB7 for ; Thu, 31 Mar 2011 16:45:42 -0300 (ADT) Received: from [192.168.1.223] (adsl-71-128-101-241.dsl.irvnca.pacbell.net [71.128.101.241]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail63.csoft.net (Postfix) with ESMTPSA id 5F09A28447; Thu, 31 Mar 2011 15:45:42 -0400 (EDT) Message-ID: <4D94D9E7.6080807@ejurka.com> Date: Thu, 31 Mar 2011 12:45:43 -0700 From: Kris Jurka User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: DI Martin Handsteiner CC: pgsql-bugs@postgresql.org Subject: Re: BUG #5961: JDBC Driver acceptURL does not check 'jdbc:postgresql:' References: <201103311309.p2VD9E8o097110@wwwmaster.postgresql.org> <002d01cbefbb$4c6f8190$e54e84b0$@handsteiner@sibvisions.com> In-Reply-To: <002d01cbefbb$4c6f8190$e54e84b0$@handsteiner@sibvisions.com> Content-Type: multipart/mixed; boundary="------------040802040300080702070208" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201103/407 X-Sequence-Number: 29917 This is a multi-part message in MIME format. --------------040802040300080702070208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------040802040300080702070208 Content-Type: text/x-java; name="Conn.java" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Conn.java" 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)); } } } --------------040802040300080702070208--