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

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

commit d9d05a425bdc418b216b7c9ea852f5c1197a10e8
Author: Kris Jurka <[email protected]>
Date:   Tue May 20 00:04:49 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 45488b1..513baf5 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.21.2.5 2006/07/07 01:12:48 jurka Exp $
+*   $PostgreSQL: pgjdbc/org/postgresql/core/v3/QueryExecutorImpl.java,v 
1.21.2.6 2008/01/28 10:10:11 jurka Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -1316,7 +1316,7 @@ public class QueryExecutorImpl implements QueryExecutor {
                     if (Driver.logDebug)
                         Driver.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