Re: getBinaryStream/setBinaryStream 7.2<->7.4 Question
От | Harry Schittler |
---|---|
Тема | Re: getBinaryStream/setBinaryStream 7.2<->7.4 Question |
Дата | |
Msg-id | 3FF09A2F.7000409@multimedia-werkstatt.com обсуждение исходный текст |
Ответ на | Re: getBinaryStream/setBinaryStream 7.2<->7.4 Question (Kris Jurka <books@ejurka.com>) |
Ответы |
Re: getBinaryStream/setBinaryStream 7.2<->7.4 Question
|
Список | pgsql-jdbc |
Hi,
Kris Jurka wrote:
The orginal setup was an 7.2 server with "latin1" encoding and the jdbc driver with default options. After upgrading the Server and the jdbc driver everything worked fine except for data retrieved via getBinaryStream() or getBytes() from a "bytea "column. Setting the data works ok (I verified this...). Changeing the client encoding with the charset property didn't help, only switching back to the older driver fixes the problem.
Barry Lind told me he thinks this is a known bug in the server, which causing translation of bytea data to unicode. He suggested switching the database to unicode. But I'm still a bit confused, about a serverbug that goes away when changing the client?
cu Harry
Kris Jurka wrote:
Sorry, I upgraded both, the Server from 7.2 to 7.4 and the jdbc driver as stated above.I just upgraded from postgres 7.2 to 7.4 (pg72jdbc2.jar to pg74.1jdbc3.jar), after the upgrade I got some behaviour I simpy dont understand.I have not been able to duplicate this in a variety of configurations. I suspect it may have something to do with the encoding used, but you have not indicated your exact setup. You say you upgraded from 7.2 to 7.4, but you only mention the JDBC driver, can you confirm that you upgraded the server as well? Also what encodings are the 7.2 and 7.4 databases running with? (You can get this from the \l command in psql.)
The orginal setup was an 7.2 server with "latin1" encoding and the jdbc driver with default options. After upgrading the Server and the jdbc driver everything worked fine except for data retrieved via getBinaryStream() or getBytes() from a "bytea "column. Setting the data works ok (I verified this...). Changeing the client encoding with the charset property didn't help, only switching back to the older driver fixes the problem.
Barry Lind told me he thinks this is a known bug in the server, which causing translation of bytea data to unicode. He suggested switching the database to unicode. But I'm still a bit confused, about a serverbug that goes away when changing the client?
cu Harry
В списке pgsql-jdbc по дате отправления: