diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index 8e78967..4e1efd5 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -504,11 +504,20 @@ def poll(trans_id):
 
         rows_affected = conn.rows_affected()
 
+    # There may be additional messages even if result is present
+    # eg: Function can provide result as well as RAISE messages
+    additional_messages = None
+    if status == 'Success' and result is not None:
+        messages = conn.messages()
+        if messages:
+            additional_messages = ''.join(messages)
+
     return make_json_response(
         data={
             'status': status, 'result': result,
             'colinfo': col_info, 'primary_keys': primary_keys,
-            'rows_affected': rows_affected
+            'rows_affected': rows_affected,
+            'additional_messages': additional_messages
         }
     )
 
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 3f121c4..e2c7cad 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -1787,12 +1787,20 @@ define(
                 alertify.success(msg1 + '<br />' + msg2, self.info_notifier_timeout);
               }
 
-              $('.sql-editor-message').text(msg1 + '\n' + msg2);
+              var _msg = msg1 + '\n' + msg2;
 
-                /* Add the data to the collection and render the grid.
-                 * In case of Explain draw the graph on explain panel
-                 * and add json formatted data to collection and render.
-                 */
+              // If there is additional messages from server then add it to message
+              if(!_.isNull(data.additional_messages) &&
+                    !_.isUndefined(data.additional_messages)) {
+                    _msg = data.additional_messages + '\n' + _msg;
+              }
+
+              $('.sql-editor-message').text(_msg);
+
+              /* Add the data to the collection and render the grid.
+               * In case of Explain draw the graph on explain panel
+               * and add json formatted data to collection and render.
+               */
               var explain_data_array = [];
               if(
                 data.result && data.result.length >= 1 &&
