Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U03yC-0001wI-9E for pgsql-jdbc@arkaria.postgresql.org; Tue, 29 Jan 2013 05:42:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U03yB-0006oC-Bj for pgsql-jdbc@arkaria.postgresql.org; Tue, 29 Jan 2013 05:42:55 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U03yA-0006o7-MI for pgsql-jdbc@postgresql.org; Tue, 29 Jan 2013 05:42:54 +0000 Received: from [222.73.24.84] (helo=song.cn.fujitsu.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U03y6-0003hi-3B for pgsql-jdbc@postgresql.org; Tue, 29 Jan 2013 05:42:54 +0000 X-IronPort-AV: E=Sophos;i="4.84,557,1355068800"; d="scan'208";a="6658382" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 29 Jan 2013 13:40:34 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r0T5ghKT001649; Tue, 29 Jan 2013 13:42:43 +0800 Received: from [127.0.0.1] ([10.167.159.99]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013012913413831-128687 ; Tue, 29 Jan 2013 13:41:38 +0800 Message-ID: <51076176.5070800@cn.fujitsu.com> Date: Tue, 29 Jan 2013 13:43:18 +0800 From: Chen Huajun User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.28) Gecko/20120306 Lightning/1.0b2 Thunderbird/3.1.20 MIME-Version: 1.0 To: dmp CC: Dave Cramer , 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> In-Reply-To: <5106BB52.5000203@ttc-cmc.net> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/01/29 13:41:38, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/01/29 13:41:38, Serialize complete at 2013/01/29 13:41:38 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8; format=flowed X-Host-Lookup-Failed: Reverse DNS lookup failed for 222.73.24.84 (failed) X-Pg-Spam-Score: -2.6 (--) 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 > 1. Dave add tasks to get the Manual to the same state as existing properties > that are implemented. So lacking documentation are: > > ApplicationName > binaryTransfer > binaryTransferDisable > binaryTransferEnable > receiveBufferSize > sendBufferSize My work was not based the newest source, so i checked again ,and found the "readOnly" was alse lacked. > 2. Chen, No I do not think at this time that ALL properties be implemented > in BaseDataSource at this time unless you desire to do so. As indicated > my initial concern was properties that are implemented and have the same > bug as you have already identified with logLevel. I agree with you danap. > 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: 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); Chen Huajun (2013/01/29 1:54), dmp wrote: > Indeed Chen this is very good work. Thank you providing this information. > > Dave though it should be the ultimate goal to have the one to one match > for all supported properties in the BaseDataSource this was not my initial > intend for asking for the review of BaseDataSource. > > Chen you have defined the complete solution, but I was more interested > in checking the existing BaseDataSource Properties being properly implemented > because of the bug you found with logLevel. I suspect that other properties > that are now implemented have the same bug. > > I would advocate that fixing the existing class is more important at this > time then implementing the complete properties set. Of course if this is > acceptable to you Chen for a course of action it is up to you. > > Recommend: > > 1. Dave add tasks to get the Manual to the same state as existing properties > that are implemented. So lacking documentation are: > > ApplicationName > binaryTransfer > binaryTransferDisable > binaryTransferEnable > receiveBufferSize > sendBufferSize > > 2. Chen, No I do not think at this time that ALL properties be implemented > in BaseDataSource at this time unless you desire to do so. As indicated > my initial concern was properties that are implemented and have the same > bug as you have already identified with logLevel. > > 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: > > binaryTransferDisable > binaryTransferEnable > > These two should probably be added since that were already defined, > but not implemented. > > danap. > > > Dave Cramer wrote: >> Chen, >> >> This is excellent work. >> >> I don't see any reason why all of the documented url parameters should >> not be available manually, and in both the data source and the connection. >> >> Dave >> >> Dave Cramer >> >> dave.cramer(at)credativ(dot)ca >> http://www.credativ.ca >> >> >> On Mon, Jan 28, 2013 at 6:28 AM, Chen Huajun > > wrote: >> >> Hi >> >> I reviewed the source related to properties. >> My idea is that the set of supported properties should be the same >> no matter the means of setting value(by url or by DataSource). >> So I get all properties by searching keyword ".getProperty(" in >> pgjdbc source, >> and then check whether BaseDataSource has correctly deal with all them. >> As a result i found many inconsistencies as listed in the attachment. >> >> I am wondering about if it's needed to add all lacked properties to >> BaseDataSource? >> >> >> Chen Huajun >> >> (2013/01/24 2:35), dmp wrote: >> >> Thank you sir for helping in identifying problems with the pgjdbc >> code and contributing to maintaining this project. >> >> danap. >> >> Chen Huajun wrote: >> >> danap, >> >> > Could you and possibly while considering the new possible >> bug you >> found with >> > copying DataSource do a more through review of the >> BaseDataSource class? >> >> OK,I will review the BaseDataSource class first. > > > -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc