Couple of patches for jdbc driver

From: Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>
To: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Cc: Patric Bechtel <bechtel(at)ipcon(dot)de>
Subject: Couple of patches for jdbc driver
Date: 2001-06-07 16:25:32
Message-ID: XFMail.20010607092532.ned.wolpert@knowledgenet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Folks-

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);

Virtually,
Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>

D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7H6r8iysnOdCML0URAtk1AJ9iG99AMLmQblpr6vK2wbhtek6JMwCeJlzP
WGJ5f75GS56BEqWy9a+UpcA=
=ZcOR
-----END PGP SIGNATURE-----

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-06-07 16:33:55 Re: Couple of patches for jdbc driver
Previous Message Dave Cramer 2001-06-07 10:56:21 Re: Loading an SQL command file via JDBC