pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Javier Yáñez <javier@cibal.es>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Charset encoding patch to JDBC driver
Date: Thu, 17 Mar 2005 00:23:41 +1300
Message-ID: <4238173D.60307@opencloud.com> (raw)
In-Reply-To: <4237FC9B.4000709@cibal.es>
References: <4237FC9B.4000709@cibal.es>

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



view thread (5+ messages)  latest in thread

Message-ID: <4238173D.60307@opencloud.com>
Permalink:  ../4238173D.60307@opencloud.com/
Also on:    postgresql.org/message-id/4238173D.60307@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, javier@cibal.es
  Subject: Re: Charset encoding patch to JDBC driver
  In-Reply-To: <4238173D.60307@opencloud.com>
  References: <4237FC9B.4000709@cibal.es> <4238173D.60307@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox