Hi,

I often use pgadmin's graphical explain to see how queries generated
be hibernate are planned&executed by postgresql, and it works really
well.
However, for very long queries pgadmin3 tries to create windows >
65536 pixels, which is not supported by X11 and therefor leads to
XErrors, which in turn cause pgadmin3 to close because of assetions.

I would propose to limit the size of the ExplainPopup to the screen
dimensions, please see the attached patch.

Thank you in advance, Clemens
--- /home/ce/pgadmin3-1.14.2/pgadmin/ctl/explainCanvas.cpp      2012-01-10 
15:27:17.000000000 +0100
+++ explainCanvas.cpp   2012-05-05 12:30:05.745379339 +0200
@@ -323,10 +323,16 @@
 
 void ExplainPopup::SetShape(ExplainShape *s)
 {
+    wxSize popupSize;
+        
        if (explainText)
                delete explainText;
        explainText = new ExplainText(this, s);
-       SetSize(explainText->GetSize());
+    
+    popupSize = explainText->GetSize();
+    popupSize.DecTo(wxGetDisplaySize());
+    
+    SetSize(popupSize);
 }
 
 
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to