]> granicus.if.org Git - postgresql/commitdiff
Applied patch for jdbc from Kim Ho at RedHat to more correctly deal with boolean...
authorBarry Lind <barry@xythos.com>
Wed, 17 Sep 2003 07:00:24 +0000 (07:00 +0000)
committerBarry Lind <barry@xythos.com>
Wed, 17 Sep 2003 07:00:24 +0000 (07:00 +0000)
 Modified Files:
  jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java

src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java

index 1f37dd34c65173cd362c1012fd0cab6453ba1769..5d6a90ae11a1103542b027fd322ec2e36b311eef 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (c) 2003, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.18 2003/09/13 04:02:15 barry Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1ResultSet.java,v 1.19 2003/09/17 07:00:24 barry Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -797,8 +797,8 @@ public abstract class AbstractJdbc1ResultSet implements BaseResultSet
        {
                if (s != null)
                {
-                       int c = s.charAt(0);
-                       return ((c == 't') || (c == 'T') || (c == '1'));
+                       s = s.trim();
+                       return (s.equalsIgnoreCase("true") || s.equals("1") || s.equalsIgnoreCase("t"));
                }
                return false;           // SQL NULL
        }