This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL8_3_604
in repository libpostgresql-jdbc-java.

commit ca13012fad751827782b0d896c9b6e2fa03d7aa3
Author: Kris Jurka <[email protected]>
Date:   Tue May 20 00:04:24 2008 +0000

    Accept UTF8 as an equivalent of UNICODE when trying to detect if
    client_encoding has changed to something the driver doesn't
    understand.  Don't try to accept every possible spelling (UTF-8) as
    UTF8 is the server's canonical name and people shouldn't be messing
    with this anyway.
---
 org/postgresql/core/v3/QueryExecutorImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/core/v3/QueryExecutorImpl.java 
b/org/postgresql/core/v3/QueryExecutorImpl.java
index 42c28b4..f1f6dc0 100644
--- a/org/postgresql/core/v3/QueryExecutorImpl.java
+++ b/org/postgresql/core/v3/QueryExecutorImpl.java
@@ -4,7 +4,7 @@
 * Copyright (c) 2004, Open Cloud Limited.
 *
 * IDENTIFICATION
-*   $PostgreSQL: pgjdbc/org/postgresql/core/v3/QueryExecutorImpl.java,v 1.38 
2008/01/08 06:56:27 jurka Exp $
+*   $PostgreSQL: pgjdbc/org/postgresql/core/v3/QueryExecutorImpl.java,v 1.39 
2008/01/28 10:08:57 jurka Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -1360,7 +1360,7 @@ public class QueryExecutorImpl implements QueryExecutor {
                     if (logger.logDebug())
                         logger.debug(" <=BE ParameterStatus(" + name + " = " + 
value + ")");
 
-                    if (name.equals("client_encoding") && 
!value.equalsIgnoreCase("UNICODE") && !allowEncodingChanges)
+                    if (name.equals("client_encoding") && 
!(value.equalsIgnoreCase("UNICODE") || value.equalsIgnoreCase("UTF8")) && 
!allowEncodingChanges)
                     {
                         protoConnection.close(); // we're screwed now; we 
can't trust any subsequent string.
                         handler.handleError(new PSQLException(GT.tr("The 
server''s client_encoding parameter was changed to {0}. The JDBC driver 
requires client_encoding to be UNICODE for correct operation.", value), 
PSQLState.CONNECTION_FAILURE));

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to