Re: pgAdmin III: Muliple SQL tabs - Mailing list pgadmin-hackers

From John Obaterspok
Subject Re: pgAdmin III: Muliple SQL tabs
Date
Msg-id CAOscVd+AC7Vjz8HrvWfhXYBpweTMPZpLNRA1FF8EE3PxVkwBbA@mail.gmail.com
Whole thread Raw
In response to Re: pgAdmin III: Muliple SQL tabs  (Sergey Busel <sbusel@gmail.com>)
List pgadmin-hackers
It's a good start Sergey!

Sharing the same connection among the tabs is what I had in mind as well. 
In the long run I would like to allow connecting to several db's from the same pgadmin window. Then have multiple tabs for each connection. Then I believe it would be easier to allow parallell queries if the they are constrained to one query per connection tab.

-- john


2016-02-03 4:25 GMT+01:00 Sergey Busel <sbusel@gmail.com>:
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.obaterspok@gmail.com> wrote:


2016-02-02 12:08 GMT+01:00 Dave Page <dpage@pgadmin.org>:
On Tue, Feb 2, 2016 at 3:17 AM, Sergey Busel <sbusel@gmail.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 


pgadmin-hackers by date:

Previous
From: Murtuza Zabuawala
Date:
Subject: PATCH: Tablespace Node [pgAdmin4]
Next
From: Murtuza Zabuawala
Date:
Subject: Re: PATCH: Tablespace Node [pgAdmin4]