Kris Jurka wrote:
>> It would be possible to support setObject for a Character, but be aware
>> that "char" is not a character long, it's a byte long, so it will fail
>> on multibyte characters.
Craig Ringer wrote:
> So really the appropriate SQL type for Java 'Character' is varchar(1) ?
> And a PostgreSQL 'char' (bpchar, not character(1)) maps best to a Java
> 'Byte' ?
Not according to the PG documentation.
According to that, SQL type "CHAR" should be just fine for a Java 'char'.
Mostly. (I worry about code points that take more than 2 bytes.)
I would not use "VARCHAR" to represent a Java 'char'.
--
Lew