From: dmp <danap@ttc-cmc.net>
To: Chen Huajun <chenhj@cn.fujitsu.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: [BUGS]log can not be output when use DataSource
Date: Tue, 29 Jan 2013 10:23:30 -0700
Message-ID: <51080592.5080904@ttc-cmc.net> (raw)
In-Reply-To: <51076176.5070800@cn.fujitsu.com>
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>
<CADK3HHJ71-or6kcrg8YytLJc00ZU6M7LRkAdvqhgK1U1d=EsiA@mail.gmail.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>
<CADK3HHLYUL52uSg37E_0a8R-W-n1V7r0KpwGQ2Hnw__OtQRqCQ@mail.gmail.com>
<5106BB52.5000203@ttc-cmc.net>
<51076176.5070800@cn.fujitsu.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
>> 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
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-jdbc@postgresql.org
Cc: danap@ttc-cmc.net, chenhj@cn.fujitsu.com
Subject: Re: [BUGS]log can not be output when use DataSource
In-Reply-To: <51080592.5080904@ttc-cmc.net>
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> <CADK3HHJ71-or6kcrg8YytLJc00ZU6M7LRkAdvqhgK1U1d=EsiA@mail.gmail.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> <CADK3HHLYUL52uSg37E_0a8R-W-n1V7r0KpwGQ2Hnw__OtQRqCQ@mail.gmail.com> <5106BB52.5000203@ttc-cmc.net> <51076176.5070800@cn.fujitsu.com> <51080592.5080904@ttc-cmc.net>
* 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