Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Charset encoding patch to JDBC driver


  • From: Oliver Jowett <oliver(at)opencloud(dot)com>
  • To: Javier Yáñez <javier(at)cibal(dot)es>
  • Cc: pgsql-jdbc(at)postgresql(dot)org
  • Subject: Re: Charset encoding patch to JDBC driver
  • Date: Thu, 17 Mar 2005 00:23:41 +1300
  • Message-id: <4238173D.60307@opencloud.com> <text/plain>

Javier Yáñez wrote:
I have the necesity of to keep a PostgreSQL database with SQL-ASCII. As the actual version of pgjdbc only have support for Unicode (at least for jdbc3), I have make a patch that allow to configure the desired charset.

I'm uncomfortable with applying this sort of patch to the official driver, since it makes the driver more complex just to handle what is arguably a database misconfiguration. It also introduces a new class of error: a mismatch between the driver's configured charSet and the actual database.

Comments on the patch itself:

- it is missing changes to the v2 protocol path
- why does it remove the client_encoding sanity check on connect?
- since encoding does not change for the lifetime of the connection, can't you make the encoding a field of QueryExecutoryImpl rather than passing it around everywhere? - it may be better to pass encoding as a parameter to SimpleParameterList methods that need it, rather than storing the (same) value on every list instance.

-O



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group