Re: SQL CHAR type using setByte() - Mailing list pgsql-jdbc

From David Wall
Subject Re: SQL CHAR type using setByte()
Date
Msg-id 009001c0ac0b$169bc960$5a2b7ad8@expertrade.com
Whole thread Raw
In response to SQL CHAR type using setByte()  ("David Wall" <d.wall@computer.org>)
List pgsql-jdbc
A quick review of the JDBC code shows that in fact everything that you pass
into the driver is converted to a String first.

Since Java char fields are 16 bit unicode characters, how does one go about
using the SQL type CHAR(1), which by default is only one byte (there is no
call setChar() in JDBC)?  I see that the driver has a type TINYINT, but I
have no idea what that maps to in Postgresql or in Java, though it sure
sounds like a byte to me.

David


pgsql-jdbc by date:

Previous
From: "David Wall"
Date:
Subject: SQL CHAR type using setByte()
Next
From: jlemcke@netspace.net.au
Date:
Subject: Re: serialized objects and JDBC driver