Re: Unable to store SHA hash (Non-HTML--Sorry) - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Unable to store SHA hash (Non-HTML--Sorry)
Date
Msg-id 22924.988867856@sss.pgh.pa.us
Whole thread Raw
In response to Unable to store SHA hash (Non-HTML--Sorry)  ("Jerry Reid" <jereid@hotmail.com>)
List pgsql-jdbc
"Jerry Reid" <jereid@hotmail.com> writes:
> This string contains several characters that are outside the normal ASCII
> range. The string could be stored and retrieved using Oracle and MySQL, but
> in Postgres any unusual characters become '?'.

Postgres will happily store anything except a null ('\0') in a text
field.  I suspect that either

(a) you have set up the database with some multibyte encoding method
activated, and your funny characters are confusing the multibyte
conversions; or

(b) the mistranslation is happening on the JDBC side.

You might try enabling query logging to see exactly what command is
arriving at the backend when you try to insert this data.  That should
determine whether the client or server side is at fault.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: "Jerry Reid"
Date:
Subject: Unable to store SHA hash (Non-HTML--Sorry)
Next
From: Rolf Schillinger
Date:
Subject: JDBC driver in pgsql 7.1 build problem