Thread: See full query text in Server Status window
Is there any way to get the full query text for a given process in the Server Status window? The Query column shows the start of it, so I presume pgAdmin has the whole thing, but is not showing it. If it's not currently possible please add it! Something like a "copy query to clipboard" context menu option or, even better, "open query in new query window" (which would automatically connect to the same database as well).
On Mon, 2012-12-03 at 21:53 +1100, Evan Martin wrote: > Is there any way to get the full query text for a given process in the > Server Status window? The Query column shows the start of it, so I > presume pgAdmin has the whole thing, but is not showing it. If it's not > currently possible please add it! Something like a "copy query to > clipboard" context menu option or, even better, "open query in new query > window" (which would automatically connect to the same database as well). > The latter already exists: third button in the toolbar (starting from the left). But remember that pgAdmin only gets what PostgreSQL gives it. What I mean is that PostgreSQL truncates the query to the 1024 first characters in old releases. In more recent releases (8.4 I think, but I may be wrong), you have the track_activity_query_size GUC to change the maximum size of a query. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
<div class="moz-cite-prefix">You're right, the third button does exactly what I want, I just didn't know about it - thanks.<br/><br /> I was looking in the main menu or context menu for this. I think it's unusual for an application to offersome command <i>only</i> from a toolbar. Cancel Query and Terminate Backend also seem to be in this category. Are thereshortcut keys for them? If not, that would be very useful.<br /><br /> Regards,<br /><br /> Evan<br /><br /> On 4/12/201211:25 PM, Guillaume Lelarge wrote:<br /></div><blockquote cite="mid:1354623941.2079.24.camel@localhost.localdomain"type="cite"><pre wrap="">On Mon, 2012-12-03 at 21:53 +1100, EvanMartin wrote: </pre><blockquote type="cite"><pre wrap="">Is there any way to get the full query text for a given process in the Server Status window? The Query column shows the start of it, so I presume pgAdmin has the whole thing, but is not showing it. If it's not currently possible please add it! Something like a "copy query to clipboard" context menu option or, even better, "open query in new query window" (which would automatically connect to the same database as well). </pre></blockquote><pre wrap=""> The latter already exists: third button in the toolbar (starting from the left). But remember that pgAdmin only gets what PostgreSQL gives it. What I mean is that PostgreSQL truncates the query to the 1024 first characters in old releases. In more recent releases (8.4 I think, but I may be wrong), you have the track_activity_query_size GUC to change the maximum size of a query. </pre></blockquote><br />
On Wed, 2012-12-05 at 19:28 +1100, Evan Martin wrote: > You're right, the third button does exactly what I want, I just didn't > know about it - thanks. > > I was looking in the main menu or context menu for this. I think it's > unusual for an application to offer some command /only/ from a toolbar. > Cancel Query and Terminate Backend also seem to be in this category. Are > there shortcut keys for them? If not, that would be very useful. > AFAIR, no shortcut, and it's probably better this way. I wouldn't like that, because of a refresh I didn't expect, I cancel another query or kill another connection. But I agree that it would be good to have the actions in some menus. Will have to keep that in mind to code it later. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
You mean pressing the shorcut key right after the server status has refreshed, so the selection is on a different row? Couldn't the same thing happen with the toolbar button? Anyway, I have a suggestion to fix that: when the list refreshes, if the previously selected process no longer exists simply select no row (ie. clear the selection). The button or shorcut key would then be disabled. On 5/12/2012 8:01 PM, Guillaume Lelarge wrote: > On Wed, 2012-12-05 at 19:28 +1100, Evan Martin wrote: >> You're right, the third button does exactly what I want, I just didn't >> know about it - thanks. >> >> I was looking in the main menu or context menu for this. I think it's >> unusual for an application to offer some command /only/ from a toolbar. >> Cancel Query and Terminate Backend also seem to be in this category. Are >> there shortcut keys for them? If not, that would be very useful. >> > AFAIR, no shortcut, and it's probably better this way. I wouldn't like > that, because of a refresh I didn't expect, I cancel another query or > kill another connection. > > But I agree that it would be good to have the actions in some menus. > Will have to keep that in mind to code it later. > >
On Wed, 2012-12-05 at 20:12 +1100, Evan Martin wrote: > You mean pressing the shorcut key right after the server status has > refreshed, so the selection is on a different row? Couldn't the same > thing happen with the toolbar button? Anyway, I have a suggestion to fix > that: when the list refreshes, if the previously selected process no > longer exists simply select no row (ie. clear the selection). The button > or shorcut key would then be disabled. > You're right. I added a ticket on this so that I can work on this later. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
Thanks, Guillaume. It's ticket 386, right? Could you also add shortcut keys while you're at it? That would be more useful than the menu items themselves. And it may be worth mentioning the whole "clear selection" thing in the ticket so it doesn't get lost. On 25/12/2012 12:48 AM, Guillaume Lelarge wrote: > On Wed, 2012-12-05 at 20:12 +1100, Evan Martin wrote: >> You mean pressing the shorcut key right after the server status has >> refreshed, so the selection is on a different row? Couldn't the same >> thing happen with the toolbar button? Anyway, I have a suggestion to fix >> that: when the list refreshes, if the previously selected process no >> longer exists simply select no row (ie. clear the selection). The button >> or shorcut key would then be disabled. >> > You're right. I added a ticket on this so that I can work on this later. > >
On Tue, 2012-12-25 at 18:38 +1100, Evan Martin wrote: > Thanks, Guillaume. It's ticket 386, right? Yes. > Could you also add shortcut keys while you're at it? Any ideas what shortcut keys you would like? I have six items: * Refresh (Ctrl-R?)* Copy query (Ctrl-Shift-C)* Cancel query (Ctrl-R?)* Terminate backend (Suppr?)* Commit prepared transaction*Rollback prepared transaction > That would be more useful than the menu items > themselves. And it may be worth mentioning the whole "clear selection" > thing in the ticket so it doesn't get lost. > It's already done. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On Thu, 2012-12-27 at 16:58 +0100, Guillaume Lelarge wrote: > On Tue, 2012-12-25 at 18:38 +1100, Evan Martin wrote: > > Thanks, Guillaume. It's ticket 386, right? > > Yes. > > > Could you also add shortcut keys while you're at it? > > Any ideas what shortcut keys you would like? I have six items: > > * Refresh (Ctrl-R?) > * Copy query (Ctrl-Shift-C) > * Cancel query (Ctrl-R?) > * Terminate backend (Suppr?) > * Commit prepared transaction > * Rollback prepared transaction > > > That would be more useful than the menu items > > themselves. And it may be worth mentioning the whole "clear selection" > > thing in the ticket so it doesn't get lost. > > > > It's already done. > BTW, if you want to test it, it's available on my github repository (https://github.com/gleu/pgadmin3.git), on the "ticket386" branch. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
I think Ctrl-R is good for refresh (like Firefox and other browsers) and Ctrl-Shift-C sounds fine, too. For Cancel Query I'd suggest "Del" - it "deletes" the process. For Terminate backend: Shift-Del - it "really delets" it, like pressing Shift-Del in Windows Explorer bypasses the Recycling Bin. Not sure about the commit/rollback buttons, but maybe Ctrl-S (save) for commit and Ctrl-Z (undo) for rollback? It's not immediately clear what the different between Edit, Copy and Action, Copy is. Maybe rename Action, Copy to "Copy to query tool" or something? I tested the "clear selection" thing. The selection is cleared when the selected process terminates and the cancel/terminate toolbar buttons don't do anything then, but they are still enabled. Would be nice to actually grey them out. Action, Copy also remains enabled and selecting that causes a segfault. On 28/12/2012 3:04 AM, Guillaume Lelarge wrote: > On Thu, 2012-12-27 at 16:58 +0100, Guillaume Lelarge wrote: >> On Tue, 2012-12-25 at 18:38 +1100, Evan Martin wrote: >>> Thanks, Guillaume. It's ticket 386, right? >> Yes. >> >>> Could you also add shortcut keys while you're at it? >> Any ideas what shortcut keys you would like? I have six items: >> >> * Refresh (Ctrl-R?) >> * Copy query (Ctrl-Shift-C) >> * Cancel query (Ctrl-R?) >> * Terminate backend (Suppr?) >> * Commit prepared transaction >> * Rollback prepared transaction >> >>> That would be more useful than the menu items >>> themselves. And it may be worth mentioning the whole "clear selection" >>> thing in the ticket so it doesn't get lost. >>> >> It's already done. >> > BTW, if you want to test it, it's available on my github repository > (https://github.com/gleu/pgadmin3.git), on the "ticket386" branch. > >
On Fri, 2012-12-28 at 23:52 +1100, Evan Martin wrote: > I think Ctrl-R is good for refresh (like Firefox and other browsers) and > Ctrl-Shift-C sounds fine, too. OK. > For Cancel Query I'd suggest "Del" - it "deletes" the process. > For Terminate backend: Shift-Del - it "really delets" it, like pressing > Shift-Del in Windows Explorer bypasses the Recycling Bin. OK. > Not sure about the commit/rollback buttons, but maybe Ctrl-S (save) for > commit and Ctrl-Z (undo) for rollback? > Ctrl-Z is explicitely to handle undo on the UI. We don't use it here, but for consistency sake, we won't use it for anything else. > It's not immediately clear what the different between Edit, Copy and > Action, Copy is. Maybe rename Action, Copy to "Copy to query tool" or > something? > Seems fine to me. > I tested the "clear selection" thing. The selection is cleared when the > selected process terminates and the cancel/terminate toolbar buttons > don't do anything then, but they are still enabled. Would be nice to > actually grey them out. Action, Copy also remains enabled and selecting > that causes a segfault. > This needs to get fixed. Working on it. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On Fri, 2013-01-04 at 11:57 +0100, Guillaume Lelarge wrote: > On Fri, 2012-12-28 at 23:52 +1100, Evan Martin wrote: > > I think Ctrl-R is good for refresh (like Firefox and other browsers) and > > Ctrl-Shift-C sounds fine, too. > > OK. > > > For Cancel Query I'd suggest "Del" - it "deletes" the process. > > For Terminate backend: Shift-Del - it "really delets" it, like pressing > > Shift-Del in Windows Explorer bypasses the Recycling Bin. > > OK. > > > Not sure about the commit/rollback buttons, but maybe Ctrl-S (save) for > > commit and Ctrl-Z (undo) for rollback? > > > > Ctrl-Z is explicitely to handle undo on the UI. We don't use it here, > but for consistency sake, we won't use it for anything else. > > > It's not immediately clear what the different between Edit, Copy and > > Action, Copy is. Maybe rename Action, Copy to "Copy to query tool" or > > something? > > > > Seems fine to me. > I can commit this anytime soon. Just tell me if you want to test it first. > > I tested the "clear selection" thing. The selection is cleared when the > > selected process terminates and the cancel/terminate toolbar buttons > > don't do anything then, but they are still enabled. Would be nice to > > actually grey them out. Action, Copy also remains enabled and selecting > > that causes a segfault. > > > > This needs to get fixed. Working on it. > Fixed. Thanks for your report. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On Fri, 2013-01-04 at 12:17 +0100, Guillaume Lelarge wrote: > On Fri, 2013-01-04 at 11:57 +0100, Guillaume Lelarge wrote: > > On Fri, 2012-12-28 at 23:52 +1100, Evan Martin wrote: > > > I think Ctrl-R is good for refresh (like Firefox and other browsers) and > > > Ctrl-Shift-C sounds fine, too. > > > > OK. > > > > > For Cancel Query I'd suggest "Del" - it "deletes" the process. > > > For Terminate backend: Shift-Del - it "really delets" it, like pressing > > > Shift-Del in Windows Explorer bypasses the Recycling Bin. > > > > OK. > > > > > Not sure about the commit/rollback buttons, but maybe Ctrl-S (save) for > > > commit and Ctrl-Z (undo) for rollback? > > > > > > > Ctrl-Z is explicitely to handle undo on the UI. We don't use it here, > > but for consistency sake, we won't use it for anything else. > > > > > It's not immediately clear what the different between Edit, Copy and > > > Action, Copy is. Maybe rename Action, Copy to "Copy to query tool" or > > > something? > > > > > > > Seems fine to me. > > > > I can commit this anytime soon. Just tell me if you want to test it > first. > Done. Thanks for your help. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com