libpq does not accept client_encoding
authorMarko Kreen <markokr@gmail.com>
Thu, 11 Oct 2007 10:24:40 +0000 (10:24 +0000)
committerMarko Kreen <markokr@gmail.com>
Thu, 11 Oct 2007 10:24:40 +0000 (10:24 +0000)
src/execute.c

index a9b2edd13deef739460a5ddd1bb53c19e631accb..12b76a8895d62aaaba12eb8e69308370fe14f92b 100644 (file)
@@ -250,7 +250,6 @@ static void
 prepare_conn(ProxyFunction *func, ProxyConnection *conn)
 {
        struct timeval now;
-       StringInfoData connstr;
 
        gettimeofday(&now, NULL);
 
@@ -278,14 +277,6 @@ prepare_conn(ProxyFunction *func, ProxyConnection *conn)
 
        conn->connect_time = now.tv_sec;
 
-       /*
-        * Force client_encoding on server side
-        * to same as current client_encoding.
-        */
-       initStringInfo(&connstr);
-       appendStringInfo(&connstr, "%s client_encoding=%s", conn->connstr,
-                                        pg_get_client_encoding_name());
-
        /* launch new connection */
        conn->db = PQconnectStart(conn->connstr);
        if (conn->db == NULL)
@@ -296,9 +287,6 @@ prepare_conn(ProxyFunction *func, ProxyConnection *conn)
 
        if (PQstatus(conn->db) == CONNECTION_BAD)
                conn_error(func, conn, "PQconnectStart");
-
-       /* free connstr early */
-       pfree(connstr.data);
 }
 
 /*