Thread: How to enable PgAdmin Query Tool Favorites

How to enable PgAdmin Query Tool Favorites

From
Vahdet Mert
Date:
<div dir="ltr"> Hi PGAdmin Support,<br /> <br />On 2 Sep, I sent message to <a
href="mailto:pgsql-bugs@postgresql.org">pgsql-bugs@postgresql.org</a>asking for help with PgAdmin Query Tool Favorites.
Ihavent received any reply and I hope this group will be more helpful:<br /> <br />Bug reference: 13605<br />Logged by:
VahdetMert<br />Email address: vahdet.mert@hotmail.com<br />PostgreSQL version: 9.3.9<br />Operating system: ubuntu
14.04<br/>Description: <br /><br />I use pgAdmin extensively but cannot get the Query Tool favorites to work.<br />The
AddFavourite and Manage Favourite menu options are greyed out.<br /><br />I have a valid .pgadminfavorites xml file as
Ican edit the xml directly and<br />see the resulting favorites queries under the Favorites menu. But I just<br
/>cannotadd new favorites or manage existing through the pgadmin interface.<br /><br />Running Ubuntu 14.04 and pgAdmin
1.18.1<br/><br />Thanks,<br />Vahdet<br /> <br />            <br /></div> 

Re: How to enable PgAdmin Query Tool Favorites

From
Colin Beckingham
Date:
On 15/09/15 10:46 PM, Vahdet Mert wrote:<br /><blockquote cite="mid:COL131-W665E339FC0F3C70ED4936AE55B0@phx.gbl"
type="cite"><style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style><div dir="ltr"> Hi PGAdmin Support,<br />  <br /> On 2 Sep, I sent message to <a
href="mailto:pgsql-bugs@postgresql.org"moz-do-not-send="true">pgsql-bugs@postgresql.org</a> asking for help with
PgAdminQuery Tool Favorites. I havent received any reply and I hope this group will be more helpful:<br />  <br /> Bug
reference:13605<br /> Logged by: Vahdet Mert<br /> Email address: <a class="moz-txt-link-abbreviated"
href="mailto:vahdet.mert@hotmail.com">vahdet.mert@hotmail.com</a><br/> PostgreSQL version: 9.3.9<br /> Operating
system:ubuntu 14.04<br /> Description: <br /><br /> I use pgAdmin extensively but cannot get the Query Tool favorites
towork.<br /> The Add Favourite and Manage Favourite menu options are greyed out.<br /><br /> I have a valid
.pgadminfavoritesxml file as I can edit the xml directly and<br /> see the resulting favorites queries under the
Favoritesmenu. But I just<br /> cannot add new favorites or manage existing through the pgadmin interface.<br /><br />
RunningUbuntu 14.04 and pgAdmin 1.18.1<br /><br /> Thanks,<br /> Vahdet<br />  <br />             <br
/></div></blockquote>As feedback, works for me. I'm on openSUSE 13.2 latest pgadmin and I can save and retrieve
queries.Note that the add favorite remains greyed out until there is actually something in the query box to save. As
soonas a query is saved as a favourite, when you click the menu item the fav appears at the bottom of the list of
optionsand a click on that brings it back. Manage favs remains greyed out until there is something to manage.<br /><br
/>

Re: How to enable PgAdmin Query Tool Favorites

From
Vahdet Mert
Date:

Hi Colin,

Thanks for the feedback. I have also pgAdmin III installed on my Windows 7 workstation and I can observe there the exact behaviour that you are explaining:
- add favorite remains greyed out until there is actually something in the query box to save
- manage favs remains greyed out until there is something to manage

But on my Ubuntu 14.04 laptop, the ‘Add favourite…’ and ‘Manage favourites…’ are greyed out all the time.

I have text entered in the query box and the ‘Add favourite…’ is still grey.

Regards,
Vahdet

 


Subject: Re: [pgadmin-support] How to enable PgAdmin Query Tool Favorites
To: vahdet.mert@hotmail.com; pgadmin-support@postgresql.org
From: colbec@kingston.net
Date: Wed, 16 Sep 2015 05:12:33 -0400

On 15/09/15 10:46 PM, Vahdet Mert wrote:
Hi PGAdmin Support,
 
On 2 Sep, I sent message to pgsql-bugs@postgresql.org asking for help with PgAdmin Query Tool Favorites. I havent received any reply and I hope this group will be more helpful:
 
Bug reference: 13605
Logged by: Vahdet Mert
Email address: vahdet.mert@hotmail.com
PostgreSQL version: 9.3.9
Operating system: ubuntu 14.04
Description:

I use pgAdmin extensively but cannot get the Query Tool favorites to work.
The Add Favourite and Manage Favourite menu options are greyed out.

I have a valid .pgadminfavorites xml file as I can edit the xml directly and
see the resulting favorites queries under the Favorites menu. But I just
cannot add new favorites or manage existing through the pgadmin interface.

Running Ubuntu 14.04 and pgAdmin 1.18.1

Thanks,
Vahdet
 
           
As feedback, works for me. I'm on openSUSE 13.2 latest pgadmin and I can save and retrieve queries. Note that the add favorite remains greyed out until there is actually something in the query box to save. As soon as a query is saved as a favourite, when you click the menu item the fav appears at the bottom of the list of options and a click on that brings it back. Manage favs remains greyed out until there is something to manage.

Re: How to enable PgAdmin Query Tool Favorites

From
"J.F. Oster"
Date:
<p>Hi!<p><br /><p>I've noticed this too but had no time to research.<p>If I recall it correctly, there shows up some
differencein events order when building the menu.<p>May be, in buggy scenario, pgAdmin first checks the number of menu
items(0) and decides to disable, later the menu is filled with items.<p><br /><p>If You are on Ubuntu, could you try
withanother desktop environment? (KDE or Gnome instead of default Unity).<p>I remember that the bug shows up with Unity
only.<p><br/><p><br /><p><br /><p>Thursday, September 17, 2015, 4:18:34 AM, you wrote:<p><br /><div><a
name="stopSpelling"></a><tableborder="0" cellpadding="1" cellspacing="2"><tr valign="top"><td style="background-color:
#0000ff;"width="13"><p><span class="rvts6">></span></td><td style="background-color: #ffffff;" width="1124"><p><br
/><p><br/><p><span class="rvts7">Hi Colin,</span><p><span class="rvts7">Thanks for the feedback. I have also pgAdmin
IIIinstalled on my Windows 7 workstation and I can observe there the exact behaviour that you are
explaining: </span><p><spanclass="rvts7">- add favorite remains greyed out until there is actually something in the
querybox to save</span><p><span class="rvts7">- manage favs remains greyed out until there is something to
manage</span><p><spanclass="rvts7">But on my Ubuntu 14.04 laptop, the ‘Add favourite…’ and ‘Manage favourites…’ are
greyedout all the time.</span><p><span class="rvts7">I have text entered in the query box and the ‘Add favourite…’ is
stillgrey.</span><p><span class="rvts7">Regards,</span><p><span class="rvts7">Vahdet</span><p><br /><p><span
class="rvts7"> </span><p><br/><hr noshade size="2" /><p><span class="rvts7">Subject: Re: [pgadmin-support] How to
enablePgAdmin Query Tool Favorites</span><p><span class="rvts7">To: vahdet.mert@hotmail.com;
pgadmin-support@postgresql.org</span><p><spanclass="rvts7">From: colbec@kingston.net</span><p><span class="rvts7">Date:
Wed,16 Sep 2015 05:12:33 -0400</span><p><br /><p><span class="rvts7">On 15/09/15 10:46 PM, Vahdet Mert
wrote:</span><p><br/></td></tr></table></div><p><span class="rvts8">Hi PGAdmin Support,</span><p><span
class="rvts8"> </span><p><spanclass="rvts8">On 2 Sep, I sent message to </span><a class="rvts9"
href="mailto:pgsql-bugs@postgresql.org">pgsql-bugs@postgresql.org</a><spanclass="rvts8"> asking for help with PgAdmin
QueryTool Favorites. I havent received any reply and I hope this group will be more helpful:</span><p><span
class="rvts8"> </span><p><spanclass="rvts8">Bug reference: 13605</span><p><span class="rvts8">Logged by: Vahdet
Mert</span><p><spanclass="rvts8">Email address: </span><a class="rvts9"
href="mailto:vahdet.mert@hotmail.com">vahdet.mert@hotmail.com</a><p><spanclass="rvts8">PostgreSQL version:
9.3.9</span><p><spanclass="rvts8">Operating system: ubuntu 14.04</span><p><span
class="rvts8">Description: </span><p><br/><p><span class="rvts8">I use pgAdmin extensively but cannot get the Query
Toolfavorites to work.</span><p><span class="rvts8">The Add Favourite and Manage Favourite menu options are greyed
out.</span><p><br/><p><span class="rvts8">I have a valid .pgadminfavorites xml file as I can edit the xml directly
and</span><p><spanclass="rvts8">see the resulting favorites queries under the Favorites menu. But I just</span><p><span
class="rvts8">cannotadd new favorites or manage existing through the pgadmin interface.</span><p><br /><p><span
class="rvts8">RunningUbuntu 14.04 and pgAdmin 1.18.1</span><p><br /><p><span class="rvts8">Thanks,</span><p><span
class="rvts8">Vahdet</span><p><spanclass="rvts8"> </span><p><span class="rvts8">            </span><p><span
class="rvts8">Asfeedback, works for me. I'm on openSUSE 13.2 latest pgadmin and I can save and retrieve queries. Note
thatthe add favorite remains greyed out until there is actually something in the query box to save. As soon as a query
issaved as a favourite, when you click the menu item the fav appears at the bottom of the list of options and a click
onthat brings it back. Manage favs remains greyed out until there is something to manage.</span><p><br /><p><br
/><p><br/><p><br /><p><br /><p><span class="rvts10">-- </span><p><span class="rvts10">Best regards,</span><p><span
class="rvts10"> J.F.</span>

Re: How to enable PgAdmin Query Tool Favorites

From
Vahdet Mert
Date:
Thanks J.F.
I tried another desktop environment on Ubuntu: KDE (kubuntu) and the behaviour of the Query Tool Favorites is as expected. I can add new favorites and edit the existing ones using the GUI.
As you said looks like the bug is related only to Unity. Which unfortunately is the default desktop environment for Ubuntu.
regards,
Vahdet
 

Date: Fri, 18 Sep 2015 07:04:00 +0300
From: jinfroster@mail.ru
To: vahdet.mert@hotmail.com
CC: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] How to enable PgAdmin Query Tool Favorites

Hi!


I've noticed this too but had no time to research.
If I recall it correctly, there shows up some difference in events order when building the menu.
May be, in buggy scenario, pgAdmin first checks the number of menu items (0) and decides to disable, later the menu is filled with items.


If You are on Ubuntu, could you try with another desktop environment? (KDE or Gnome instead of default Unity).
I remember that the bug shows up with Unity only.






Thursday, September 17, 2015, 4:18:34 AM, you wrote:


>




Hi Colin,
Thanks for the feedback. I have also pgAdmin III installed on my Windows 7 workstation and I can observe there the exact behaviour that you are explaining: 
- add favorite remains greyed out until there is actually something in the query box to save
- manage favs remains greyed out until there is something to manage
But on my Ubuntu 14.04 laptop, the ‘Add favourite…’ and ‘Manage favourites…’ are greyed out all the time.
I have text entered in the query box and the ‘Add favourite…’ is still grey.
Regards,
Vahdet


 



Subject: Re: [pgadmin-support] How to enable PgAdmin Query Tool Favorites
To: vahdet.mert@hotmail.com; pgadmin-support@postgresql.org
From: colbec@kingston.net
Date: Wed, 16 Sep 2015 05:12:33 -0400


On 15/09/15 10:46 PM, Vahdet Mert wrote:


Hi PGAdmin Support,
 
On 2 Sep, I sent message to pgsql-bugs@postgresql.org asking for help with PgAdmin Query Tool Favorites. I havent received any reply and I hope this group will be more helpful:
 
Bug reference: 13605
Logged by: Vahdet Mert
Email address: vahdet.mert@hotmail.com
PostgreSQL version: 9.3.9
Operating system: ubuntu 14.04
Description: 


I use pgAdmin extensively but cannot get the Query Tool favorites to work.
The Add Favourite and Manage Favourite menu options are greyed out.


I have a valid .pgadminfavorites xml file as I can edit the xml directly and
see the resulting favorites queries under the Favorites menu. But I just
cannot add new favorites or manage existing through the pgadmin interface.


Running Ubuntu 14.04 and pgAdmin 1.18.1


Thanks,
Vahdet
 
            
As feedback, works for me. I'm on openSUSE 13.2 latest pgadmin and I can save and retrieve queries. Note that the add favorite remains greyed out until there is actually something in the query box to save. As soon as a query is saved as a favourite, when you click the menu item the fav appears at the bottom of the list of options and a click on that brings it back. Manage favs remains greyed out until there is something to manage.










-- 
Best regards,
 J.F.

Re: How to enable PgAdmin Query Tool Favorites

From
Ashesh Vashi
Date:
Hi Vahdet,

The logic written to enable/disable menus were dependent on the current focused control.
But - for some reason, wxWidgets was not able to get the current focused control for certain events.
And, that was resulting into not disabling few menu items for Query Editor.

It was not just applied to "Add/Manage favourite", but - also some other menu items in Edit menu.
i.e. Undo, Redo, Cut, Copy, Paste, etc.

I have made some changes in the current implementation to resolve the issue.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company


http://www.linkedin.com/in/asheshvashi


On Tue, Sep 22, 2015 at 11:59 AM, Vahdet Mert <vahdet.mert@hotmail.com> wrote:
Thanks J.F.
I tried another desktop environment on Ubuntu: KDE (kubuntu) and the behaviour of the Query Tool Favorites is as expected. I can add new favorites and edit the existing ones using the GUI.
As you said looks like the bug is related only to Unity. Which unfortunately is the default desktop environment for Ubuntu.
regards,
Vahdet
 

Date: Fri, 18 Sep 2015 07:04:00 +0300
From: jinfroster@mail.ru
To: vahdet.mert@hotmail.com
CC: pgadmin-support@postgresql.org

Subject: Re: [pgadmin-support] How to enable PgAdmin Query Tool Favorites

Hi!


I've noticed this too but had no time to research.
If I recall it correctly, there shows up some difference in events order when building the menu.
May be, in buggy scenario, pgAdmin first checks the number of menu items (0) and decides to disable, later the menu is filled with items.


If You are on Ubuntu, could you try with another desktop environment? (KDE or Gnome instead of default Unity).
I remember that the bug shows up with Unity only.






Thursday, September 17, 2015, 4:18:34 AM, you wrote:


>




Hi Colin,
Thanks for the feedback. I have also pgAdmin III installed on my Windows 7 workstation and I can observe there the exact behaviour that you are explaining: 
- add favorite remains greyed out until there is actually something in the query box to save
- manage favs remains greyed out until there is something to manage
But on my Ubuntu 14.04 laptop, the ‘Add favourite…’ and ‘Manage favourites…’ are greyed out all the time.
I have text entered in the query box and the ‘Add favourite…’ is still grey.
Regards,
Vahdet


 



Subject: Re: [pgadmin-support] How to enable PgAdmin Query Tool Favorites
To: vahdet.mert@hotmail.com; pgadmin-support@postgresql.org
From: colbec@kingston.net
Date: Wed, 16 Sep 2015 05:12:33 -0400


On 15/09/15 10:46 PM, Vahdet Mert wrote:


Hi PGAdmin Support,
 
On 2 Sep, I sent message to pgsql-bugs@postgresql.org asking for help with PgAdmin Query Tool Favorites. I havent received any reply and I hope this group will be more helpful:
 
Bug reference: 13605
Logged by: Vahdet Mert
Email address: vahdet.mert@hotmail.com
PostgreSQL version: 9.3.9
Operating system: ubuntu 14.04
Description: 


I use pgAdmin extensively but cannot get the Query Tool favorites to work.
The Add Favourite and Manage Favourite menu options are greyed out.


I have a valid .pgadminfavorites xml file as I can edit the xml directly and
see the resulting favorites queries under the Favorites menu. But I just
cannot add new favorites or manage existing through the pgadmin interface.


Running Ubuntu 14.04 and pgAdmin 1.18.1


Thanks,
Vahdet
 
            
As feedback, works for me. I'm on openSUSE 13.2 latest pgadmin and I can save and retrieve queries. Note that the add favorite remains greyed out until there is actually something in the query box to save. As soon as a query is saved as a favourite, when you click the menu item the fav appears at the bottom of the list of options and a click on that brings it back. Manage favs remains greyed out until there is something to manage.










-- 
Best regards,
 J.F.

Re: How to enable PgAdmin Query Tool Favorites

From
Vahdet Mert
Date:
Thanks Ashesh,
Following your advice, I installed pgAdmin III v.1.20.0 and the Favourites menu is working perfectly:
“Manage favourites” is active all the time
when  I enter text in the query box, I can save it using the “Add favourites”
Also there is a new menu item: “Inject”
Thanks for your help,
Vahdet

 

From: ashesh.vashi@enterprisedb.com
Date: Tue, 22 Sep 2015 13:31:02 +0530
Subject: Re: [pgadmin-support] How to enable PgAdmin Query Tool Favorites
To: vahdet.mert@hotmail.com
CC: jinfroster@mail.ru; pgadmin-support@postgresql.org

Hi Vahdet,

The logic written to enable/disable menus were dependent on the current focused control.
But - for some reason, wxWidgets was not able to get the current focused control for certain events.
And, that was resulting into not disabling few menu items for Query Editor.

It was not just applied to "Add/Manage favourite", but - also some other menu items in Edit menu.
i.e. Undo, Redo, Cut, Copy, Paste, etc.

I have made some changes in the current implementation to resolve the issue.


--
Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



http://www.linkedin.com/in/asheshvashi

On Tue, Sep 22, 2015 at 11:59 AM, Vahdet Mert <vahdet.mert@hotmail.com> wrote:
Thanks J.F.
I tried another desktop environment on Ubuntu: KDE (kubuntu) and the behaviour of the Query Tool Favorites is as expected. I can add new favorites and edit the existing ones using the GUI.
As you said looks like the bug is related only to Unity. Which unfortunately is the default desktop environment for Ubuntu.
regards,
Vahdet
 

Date: Fri, 18 Sep 2015 07:04:00 +0300
From: jinfroster@mail.ru
To: vahdet.mert@hotmail.com
CC: pgadmin-support@postgresql.org

Subject: Re: [pgadmin-support] How to enable PgAdmin Query Tool Favorites

Hi!


I've noticed this too but had no time to research.
If I recall it correctly, there shows up some difference in events order when building the menu.
May be, in buggy scenario, pgAdmin first checks the number of menu items (0) and decides to disable, later the menu is filled with items.


If You are on Ubuntu, could you try with another desktop environment? (KDE or Gnome instead of default Unity).
I remember that the bug shows up with Unity only.






Thursday, September 17, 2015, 4:18:34 AM, you wrote:


>




Hi Colin,
Thanks for the feedback. I have also pgAdmin III installed on my Windows 7 workstation and I can observe there the exact behaviour that you are explaining: 
- add favorite remains greyed out until there is actually something in the query box to save
- manage favs remains greyed out until there is something to manage
But on my Ubuntu 14.04 laptop, the ‘Add favourite…’ and ‘Manage favourites…’ are greyed out all the time.
I have text entered in the query box and the ‘Add favourite…’ is still grey.
Regards,
Vahdet


 



Subject: Re: [pgadmin-support] How to enable PgAdmin Query Tool Favorites
To: vahdet.mert@hotmail.com; pgadmin-support@postgresql.org
From: colbec@kingston.net
Date: Wed, 16 Sep 2015 05:12:33 -0400


On 15/09/15 10:46 PM, Vahdet Mert wrote:


Hi PGAdmin Support,
 
On 2 Sep, I sent message to pgsql-bugs@postgresql.org asking for help with PgAdmin Query Tool Favorites. I havent received any reply and I hope this group will be more helpful:
 
Bug reference: 13605
Logged by: Vahdet Mert
Email address: vahdet.mert@hotmail.com
PostgreSQL version: 9.3.9
Operating system: ubuntu 14.04
Description: 


I use pgAdmin extensively but cannot get the Query Tool favorites to work.
The Add Favourite and Manage Favourite menu options are greyed out.


I have a valid .pgadminfavorites xml file as I can edit the xml directly and
see the resulting favorites queries under the Favorites menu. But I just
cannot add new favorites or manage existing through the pgadmin interface.


Running Ubuntu 14.04 and pgAdmin 1.18.1


Thanks,
Vahdet
 
            
As feedback, works for me. I'm on openSUSE 13.2 latest pgadmin and I can save and retrieve queries. Note that the add favorite remains greyed out until there is actually something in the query box to save. As soon as a query is saved as a favourite, when you click the menu item the fav appears at the bottom of the list of options and a click on that brings it back. Manage favs remains greyed out until there is something to manage.










-- 
Best regards,
 J.F.