Re: Using boolean '1' in jdbc2 - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: Using boolean '1' in jdbc2
Date
Msg-id 3BA1624A.8020506@xythos.com
Whole thread Raw
In response to Re: Using boolean '1' in jdbc2  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-jdbc
Peter,

Good question.  There was a mail thread on this probably about six
months ago.  IIRC this was done so that you could call getBoolean() on
an integer column.  I think that some other database supported this and
they wanted to have postgres support it in the same way.  I think that
is when the jdbc1 code was patched to support the value '1'.  I don't
know why the jdbc2 code wasn't changed at the same time.

thanks,
--Barry



Peter Eisentraut wrote:
> Bruce Momjian writes:
>
>
>>I noticed that jdbc1 getBoolean allows '1', while jdbc2 does not.  The
>>following patch makes jdbc2 accept '1' also.  Is this OK?
>>
>
> Why?  Booleans always come out as 't' or 'f'.
>
>



pgsql-jdbc by date:

Previous
From: "Glenn R. Kronschnabl"
Date:
Subject: Re: Using boolean '1' in jdbc2
Next
From: Alexaki Sofia
Date:
Subject: Re: Transaction size limit & Data Truncation