Setting client encoding with jdbc

From: bradclark_98(at)yahoo(dot)com (Brad)
To: pgsql-hackers(at)postgresql(dot)org
Subject: Setting client encoding with jdbc
Date: 2003-11-07 22:26:15
Message-ID: b550a0d3.0311071426.6c25f975@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm interested in changing the client encoding from within a java
program. I'm using connection pooling and need to change it depending
on the client's language preference. Is there a function I can call
which changes the client encoding. Something like

pStmt = con.prepareStatement("select
pg_set_client_encoding('LATIN5'); ");
rs = pStmt.executeQuery();

I can set the client encoding from within psql by /encoding LATIN5 but
not sure how to execute something like this from java. Any help would
be greatly appreciated.

Thanks,

Brad

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Busby 2003-11-07 22:54:32 Re: [GENERAL] [HACKERS] retrieve statement from catalogs
Previous Message scott.marlowe 2003-11-07 22:25:30 Re: Performance features the 4th