On 15 January 2017 at 18:33, Kevin Wooten <kdubb@me.com> wrote:
Actually this table isn’t what I’m looking for. Related to example I provided below, there doesn’t seem to be a list of “acceptable values” when converting a string to a boolean; only that “getBoolean” must support conversion from VARCHAR/CHAR.
Ya I thought you were looking for something else. Not sure how you deal with your exact use case
On 15 January 2017 at 18:20, Kevin Wooten <kdubb@me.com> wrote:
Does anybody know where in the specification it details the required/acceptable conversions from string values to boolean? I cannot seem to find it in the PDF for 4.2.
I am curious about some of the conversions that are done. For example, calling “ResultSet.getBoolean” on a text/varchar column with the value “1.0”. This conversion succeeds because the driver (both pgjdbc & ng) fallback to decoding the column as a double then converting that by testing it “== 1”; which seems valid but questionable since “!= 0” would also be valid, but vastly different.