Re: pgAdmin III: Muliple SQL tabs

From: Sergey Busel <sbusel(at)gmail(dot)com>
To: John Obaterspok <john(dot)obaterspok(at)gmail(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgAdmin III: Muliple SQL tabs
Date: 2016-02-03 03:25:53
Message-ID: CAK-Xf3v-agt==jML5Rt3uxkx9t0QGV0POz6WUHGG58J96aT8NQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

No, that's not the way it works in this patch. All SQL tabs are sharing the
same output pane. At this point, the tabs only help organize code into
files. For me, it's easier to switch tabs and hit F5 then keep highlighting
the text to execute in the same query box.

I know that this is not a true and complete implementation of the tabbed UI
for a database, but making a separate output pane for each query would
require a lot more code changes. Also, you would probably want to be able
to execute code on more then one tab in parallel, which would require a
separate connection for each tab. (Although I can definitely see a benefit
of having an output pane per tab even if they all share the same
connection.) Personally, I tend to keep a lot of tabs open purely for code
organization purposes and would not want to saturate the server with so
many connections.

I might tackle some of the above points later, but seeing how I am not very
well versed in C++ and that this is my first ever contribution to this
project (or any project using C++ for that matter), I would prefer not to
take on such big changes right away. On the other hand, I would be more
then willing to collaborate with somebody on some of bigger changes, if
needed.

On Tue, Feb 2, 2016 at 12:45 PM, John Obaterspok <john(dot)obaterspok(at)gmail(dot)com>
wrote:

>
>
> 2016-02-02 12:08 GMT+01:00 Dave Page <dpage(at)pgadmin(dot)org>:
>
>> On Tue, Feb 2, 2016 at 3:17 AM, Sergey Busel <sbusel(at)gmail(dot)com> wrote:
>> > Patch file for multiple SQL tabs is attached.
>>
>> Thanks - I see how this could be useful. I think it needs a little
>> work before it could be included:
>>
>> - Unused code should be removed, not commented out.
>> - I think the tab names should reflect the file name (where there is
>> one) - e.g. "Query 2" should become "foo.sql" (without the path) if
>> you save the query.
>> - There should be some way for the user to see which tab the results
>> are related to. Maybe the output pane title should read "Output Pane
>> (Query 2)" or "Output Pane (foo.sql)" as appropriate? I'm not sure if
>> that will do weird things with the perspective though - they used to
>> include panel titles.
>> - Instead of the "Close Tab" menu option, perhaps an X button should
>> be added to the right-hand end of the active tab?
>>
>>
> I haven't tested this but I agree with the above comments. Regarding the
> results pane I assume the output window, results window, query time, etc
> all reflect the current SQL query tab? So if you have two tabs with
> different queries you can switch between them and see their result window.
>
> -- john
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2016-02-03 05:19:42 Re: [pgAdmin4] Patch: Added new Control SqlFieldControl
Previous Message Sergey Busel 2016-02-03 03:07:09 Re: pgAdmin III: Muliple SQL tabs