Re: JDBC Prepared Statement Bug - Mailing list pgsql-general

From Doug McNaught
Subject Re: JDBC Prepared Statement Bug
Date
Msg-id m31yenqen6.fsf@varsoon.denali.to
Whole thread Raw
In response to JDBC Prepared Statement Bug  (Dave <dave@candata.com>)
List pgsql-general
Dave Smith <dave.smith@candata.com> writes:

> Well it is actually coded as '\u0000' which is valid value for a
> character type. The 'C' backend takes this as '\0' and and end of line
> terminator.

Hmmm, I don't know all the ins and outs of the i18n stuff, but you
should probably be storing strings as UTF-8 if you expect PG to handle
them as character data.  The String.getBytes(String enc) call should
do it.

-Doug
--
Doug McNaught       Wireboard Industries      http://www.wireboard.com/

      Custom software development, systems and network consulting.
      Java PostgreSQL Enhydra Python Zope Perl Apache Linux BSD...

pgsql-general by date:

Previous
From: Carl van Tast
Date:
Subject: Re: Select not using primary key index
Next
From: Steve Lane
Date:
Subject: Re: Last Insert