]> granicus.if.org Git - postgresql/commit
Got two patches that were found by folks on the Castor list, that we'd like to
authorBruce Momjian <bruce@momjian.us>
Mon, 11 Jun 2001 22:12:00 +0000 (22:12 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 11 Jun 2001 22:12:00 +0000 (22:12 +0000)
commit8af0ea9dc137d39f44d40c7b5246f24f06c3a03d
tree19ad646829616c3cd22481ec8ea702396ba01355
parent05150e2df398b982b70dad1da37cf3cc5e0105b0
  Got two patches that were found by folks on the Castor list, that we'd like to
submit.  These were done for the jdbc2 driver.  The first one is for support
of the Types.BIT in the PreparedStatement class.  The following lines need to be
inserted in the switch statment, at around line 530:

(Prepared statment, line 554, before the default: switch
case Types.BIT:
     if (x instanceof Boolean) {
          set(parameterIndex, ((Boolean)x).booleanValue() ? "TRUE" : "FALSE");
     } else {
          throw new PSQLException("postgresql.prep.type");
     }
     break;

The second one is dealing with blobs,

inserted in PreparedStatemant.java (After previous patch line, 558):
         case Types.BINARY:
         case Types.VARBINARY:
                              setObject(parameterIndex,x);
                              break;
and in ResultSet.java (Around line 857):
        case Types.BINARY:
        case Types.VARBINARY:
                        return getBytes(columnIndex);

Ned Wolpert <ned.wolpert@knowledgenet.com>
src/interfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java
src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java