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: 2005-03-16 11:23:41
Message-ID: 4238173D.60307@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message mikael-aronsson 2005-03-16 12:30:03 Arrays
Previous Message Javier Yáñez 2005-03-16 09:30:03 Charset encoding patch to JDBC driver