Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U0EvY-0004RC-Ib for pgsql-jdbc@arkaria.postgresql.org; Tue, 29 Jan 2013 17:24:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U0EvX-000288-8t for pgsql-jdbc@arkaria.postgresql.org; Tue, 29 Jan 2013 17:24:55 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U0EvW-000282-Dy for pgsql-jdbc@postgresql.org; Tue, 29 Jan 2013 17:24:54 +0000 Received: from outbound.vnet-inc.com ([216.146.104.103]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U0EvS-0005u1-Qh for pgsql-jdbc@postgresql.org; Tue, 29 Jan 2013 17:24:53 +0000 Received: from [192.168.157.132] (unknown [76.75.27.41]) by outbound.vnet-inc.com (Postfix) with ESMTP id 3DED95A65; Tue, 29 Jan 2013 10:24:48 -0700 (MST) Message-ID: <51080592.5080904@ttc-cmc.net> Date: Tue, 29 Jan 2013 10:23:30 -0700 From: dmp User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.13) Gecko/20100914 SeaMonkey/2.0.8 MIME-Version: 1.0 To: Chen Huajun , pgsql-jdbc@postgresql.org Subject: Re: [BUGS]log can not be output when use DataSource References: <50F8335B.6070404@ttc-cmc.net> <50FA1403.7020301@cn.fujitsu.com> <50FAF98A.1030008@ttc-cmc.net> <50FBCA78.3040007@cn.fujitsu.com> <50FC3529.3060101@ttc-cmc.net> <50FCC7EC.7050307@cn.fujitsu.com> <50FD1818.8060002@cn.fujitsu.com> <50FD379F.1020304@cn.fujitsu.com> <50FD7094.9050104@ttc-cmc.net> <50FFEB3C.5050700@cn.fujitsu.com> <51002D8E.9040905@ttc-cmc.net> <510660C5.1080801@cn.fujitsu.com> <5106BB52.5000203@ttc-cmc.net> <51076176.5070800@cn.fujitsu.com> In-Reply-To: <51076176.5070800@cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org >> dmp wote: >> 3. The fourth column Chen in your spreadsheet is usefull in identifying two >> properties that are defined in the BaseDataSource but not implemented >> in getURL(). The properties user & password are included in getConnection() >> and therefore do not not need to be in getURL(). The two not implemented: > Chen Huajun wrote: > I advocate user & password also need to be in getURL(). > Because getURL() is the key way to affect a connection created by the DataSource. > If a property not need be included in getURL(),it also seems not needed to appear in BaseDataSource. > And just like DriverManager,by which can set user & password via getConnection's arguments or url, > DataSource should same to DriverManager. > > Connection db = DriverManager.getConnection(url, username, password); > > or > > String url = "jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true"; > Connection conn = DriverManager.getConnection(url); If this is a route you would like to take then that can be included with the patch for review. The Java API for the DataSource though only indicates the two methods: Connection getConnection() Connection getConnection(String username, String password) Therefore they must stay. The two additional methods you advocate only make more work, but has you say allows more flexibility. Chen, this project is really short of contributors so any major changes to the code must be accompanied by testing on your part. Maintenance seems to be me to be the main priority until that changes. That is why since you were familiar with the BaseDataSource logLevel bug I asked if you could review, to see if there were other similar bugs in that class for the properties. danap. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc