From 819a551d01045a0634ce3433e79242ceb4489954 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 18 Mar 2013 00:38:28 +0000 Subject: [PATCH] Decode Diagnostics result on Python 3 --- psycopg/diagnostics_type.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/psycopg/diagnostics_type.c b/psycopg/diagnostics_type.c index fb0244ca..18223179 100644 --- a/psycopg/diagnostics_type.c +++ b/psycopg/diagnostics_type.c @@ -67,8 +67,7 @@ psyco_diagnostics_get_field(diagnosticsObject *self, void *closure) errortext = PQresultErrorField( ((cursorObject *)curs)->pgres, (Py_intptr_t) closure); if (errortext) { - // FIXME: does this need to use conn_text_from_chars()? - rv = PyString_FromString(errortext); + rv = conn_text_from_chars(((cursorObject *)curs)->conn, errortext); } exit: if (!rv) {