diff options
Diffstat (limited to 'psycopg/connection_int.c')
-rw-r--r-- | psycopg/connection_int.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c index 78dbd46..da8a464 100644 --- a/psycopg/connection_int.c +++ b/psycopg/connection_int.c @@ -1389,7 +1389,10 @@ conn_set_client_encoding(connectionObject *self, const char *pgenc) /* If the current encoding is equal to the requested one we don't issue any query to the backend */ - if (strcmp(self->encoding, clean_enc) == 0) return 0; + if (strcmp(self->encoding, clean_enc) == 0) { + res = 0; + goto exit; + } Py_BEGIN_ALLOW_THREADS; pthread_mutex_lock(&self->lock); |