pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Kris Jurka <books@ejurka.com>
Cc: Віталій Тимчишин <tivv00@gmail.com>
Cc: PG-JDBC Mailing List <pgsql-jdbc@postgresql.org>
Subject: Re: Using java.lang.Character for "char" data type
Date: Sat, 22 May 2010 17:42:48 +0800
Message-ID: <4BF7A718.50607@postnewspapers.com.au> (raw)
In-Reply-To: <alpine.BSO.2.00.1005211813180.22460@leary.csoft.net>
References: <AANLkTinKef9bhdEhYMMzxiRLKUXtGt_cUOnIPT5sibXI@mail.gmail.com>
	<alpine.BSO.2.00.1005211813180.22460@leary.csoft.net>

On 22/05/2010 6:16 AM, 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.

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' ?

--
Craig Ringer



view thread (8+ messages)  latest in thread

Message-ID: <4BF7A718.50607@postnewspapers.com.au>
Permalink:  ../4BF7A718.50607@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4BF7A718.50607@postnewspapers.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: craig@postnewspapers.com.au, books@ejurka.com, tivv00@gmail.com
  Subject: Re: Using java.lang.Character for "char" data type
  In-Reply-To: <4BF7A718.50607@postnewspapers.com.au>
  References: <AANLkTinKef9bhdEhYMMzxiRLKUXtGt_cUOnIPT5sibXI@mail.gmail.com> <alpine.BSO.2.00.1005211813180.22460@leary.csoft.net> <4BF7A718.50607@postnewspapers.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox