[pgAdmin][RM4730] Execute leaves only the latest Message - the others are cleared

Aditya Toshniwal <[email protected]>
Newsgroups gmane.comp.db.postgresql.pgadmin.devel
Message-ID <CAM9w-_noik5YPxGqVWO2ciRMcUDFQDLtLS5Uxk3Fme+QS6unkA@mail.gmail.com>
Hi Hackers,

Attached is the patch to retain messages from long-running pgsql blocks.
Currently, only last message is retained and others are cleared in the
messages tab.

Kindly review.

-- 
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
RM4730.patch (application/octet-stream, 1.5 KB)
diff --git a/web/pgadmin/static/js/sqleditor/call_render_after_poll.js b/web/pgadmin/static/js/sqleditor/call_render_after_poll.js
index c3d21730c..23b1daa2b 100644
--- a/web/pgadmin/static/js/sqleditor/call_render_after_poll.js
+++ b/web/pgadmin/static/js/sqleditor/call_render_after_poll.js
@@ -40,7 +40,7 @@ export function callRenderAfterPoll(sqlEditor, alertify, res) {
       res.result += '\n\n' + msg;
     else
       res.result = msg;
-    sqlEditor.update_msg_history(true, res.result, true);
+    sqlEditor.update_msg_history(true, res.result, false);
     sqlEditor.reset_data_store();
     if (isNotificationEnabled(sqlEditor)) {
       alertify.success(msg, sqlEditor.info_notifier_timeout);
diff --git a/web/regression/javascript/sqleditor/call_render_after_poll_spec.js b/web/regression/javascript/sqleditor/call_render_after_poll_spec.js
index 8f30c10c2..bb3ba6053 100644
--- a/web/regression/javascript/sqleditor/call_render_after_poll_spec.js
+++ b/web/regression/javascript/sqleditor/call_render_after_poll_spec.js
@@ -82,7 +82,7 @@ describe('#callRenderAfterPoll', () => {
         expect(sqlEditorSpy.update_msg_history).toHaveBeenCalledWith(
           true,
           'Some result\n\nQuery returned successfully in 0 msec.',
-          true
+          false
         );
       });
 
@@ -173,7 +173,7 @@ describe('#callRenderAfterPoll', () => {
         expect(sqlEditorSpy.update_msg_history).toHaveBeenCalledWith(
           true,
           'Some result\n\nQuery returned successfully in 0 msec.',
-          true
+          false
         );
       });
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.