Message-ID: From: "zemian (@zemian)" To: "pgjdbc/pgjdbc" Date: Thu, 03 Aug 2017 13:08:20 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #879: loginTimeout in java.sql.DriverManager never be used In-Reply-To: References: List-Id: X-GitHub-Author-Login: zemian X-GitHub-Comment-Id: 319963795 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 879 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/879#issuecomment-319963795 Content-Type: text/plain; charset=utf-8 The current fix will use PG conn property if it's NOT zero, else it will use DriverManager. So your case will use second one. The DriverManager also default to zero if you don't set anything. Note that the DriverMangaer.loginTimeout is documented as secs and is using "int". The PG conn properly "loginTimeout" is also documented as in "secs" as well, and a max java "int" value can hold about 68 years! Is Long really needed for such timeout? The only concern I have myself, as you already pointed out, is that changing from Float.parseFloat to Integer.parseInt might break existing user config if they already started using decimal number values for loginTime (Well, actually they will get a WARNING msg b/c bad parsing, and then default to DriverManager.loginTimeout() instead). But as I argued, it will make PG conn properly consistent and easier to document from API perspective. So it will be a decision for the PG committers to decide whether they want this improvement or not. I am happy to make any modification you guys need. Just let me know what's more reasonable.