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

From Bruce Momjian
Subject Using boolean '1' in jdbc2
Date
Msg-id 200109131652.f8DGq0o25357@candle.pha.pa.us
Whole thread Raw
Responses Re: Using boolean '1' in jdbc2  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-jdbc
I noticed that jdbc1 getBoolean allows '1', while jdbc2 does not.  The
following patch makes jdbc2 accept '1' also.  Is this OK?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java,v
retrieving revision 1.33
diff -c -r1.33 ResultSet.java
*** src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java    2001/09/10 15:07:05    1.33
--- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java    2001/09/13 16:43:51
***************
*** 1396,1402 ****
          if (s != null)
          {
              int c = s.charAt(0);
!             return ((c == 't') || (c == 'T'));
          }
          return false;        // SQL NULL
      }
--- 1396,1402 ----
          if (s != null)
          {
              int c = s.charAt(0);
!             return ((c == 't') || (c == 'T') || (c == '1'));
          }
          return false;        // SQL NULL
      }

pgsql-jdbc by date:

Previous
From: Palle Girgensohn
Date:
Subject: Re: SocketException on connect, busy server
Next
From: "Dave Cramer"
Date:
Subject: Re: JDBC patch procedures (Re: [PATCHES] Patch for jdbc2 ResultSet.java)