public inbox for [email protected]  
help / color / mirror / Atom feed
From: Akshay Joshi <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][patch]: RM #3090 pgadmin shows misleading "Query returned successfully" with incorrect SQL
Date: Mon, 26 Mar 2018 16:13:24 +0530
Message-ID: <CANxoLDfycf2jb4=Jsx35w3W_SLrYOSakPG7wZ2cduwPmK5oEBQ@mail.gmail.com> (raw)

Hi Hackers,

Please find the attached patch to fix RM #3090 pgadmin shows misleading
"Query returned successfully" with incorrect SQL.

-- 
*Akshay Joshi*

*Sr. Software Architect *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


Attachments:

  [application/octet-stream] RM_3090.patch (780B, 3-RM_3090.patch)
  download | inline diff:
diff --git a/web/pgadmin/utils/driver/psycopg2/connection.py b/web/pgadmin/utils/driver/psycopg2/connection.py
index d4c9573..49dcf98 100644
--- a/web/pgadmin/utils/driver/psycopg2/connection.py
+++ b/web/pgadmin/utils/driver/psycopg2/connection.py
@@ -1580,7 +1580,7 @@ Failed to reset the connection to the server due to following error:
         if exception_obj.diag.severity is not None \
                 and exception_obj.diag.message_primary is not None:
             ex_diag_message = u"{0}:  {1}".format(
-                exception_obj.diag.severity,
+                self.decode_to_utf8(exception_obj.diag.severity),
                 self.decode_to_utf8(exception_obj.diag.message_primary)
             )
             # If both errors are different then only append it


view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin4][patch]: RM #3090 pgadmin shows misleading "Query returned successfully" with incorrect SQL
  In-Reply-To: <CANxoLDfycf2jb4=Jsx35w3W_SLrYOSakPG7wZ2cduwPmK5oEBQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox