pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: zemian (@zemian) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #879: loginTimeout in java.sql.DriverManager never be used
Date: Thu, 03 Aug 2017 13:08:20 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

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.


view thread (14+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #879: loginTimeout in java.sql.DriverManager never be used
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox