Re: JDBC and Latin1 Database problem - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: JDBC and Latin1 Database problem
Date
Msg-id 41DB6710.6070700@opencloud.com
Whole thread Raw
In response to Re: JDBC and Latin1 Database problem  ("David Gagnon" <dgagnon74@hotmail.com>)
List pgsql-jdbc
David Gagnon wrote:

>> The 'encoding' parameter is only used for connections to pre-7.3
>> servers; in other cases it is ignored.
>
>
> Really?! I must say that this REALLY solved my encoding problem. And I'm
> using 7.4 ?!  Without this flag I always get the error describe before.

Hmm -- perhaps the stable driver does things differently. I don't have
that code readily to hand.

Can you try the development driver (without any encoding parameter) and
see if you get different behaviour?

> Do I have to specify something to inform the JDBC driver that it connect
> to a Latin1 database?

You shouldn't need to.

> This statement is read from an sql file.  So no prepare statement here
> is the code that cause the problem:

>            hasResults = statement.execute(command.toString());

Can you dump out the individual (unicode) character values of 'command'
just to check you're really executing the query you think you are?

-O

pgsql-jdbc by date:

Previous
From: deepthi@granwill.com
Date:
Subject: Calling a table in another database from plpgsql
Next
From: Kris Jurka
Date:
Subject: Re: Calling a table in another database from plpgsql