Thread: Query tool greyed out

Query tool greyed out

From
Rob McDonell
Date:
In both version 1.6 and 1.8 (can't remember earlier) the SQL button and 
Query Tool menu item are inactive/greyed out when a Role is selected in 
the Object Browser. This tool should always be available: regardless of 
what you're browsing, you might want to write a query.

Thanks,
Rob.


Re: Query tool greyed out

From
Dave Page
Date:
Rob McDonell wrote:
> In both version 1.6 and 1.8 (can't remember earlier) the SQL button and
> Query Tool menu item are inactive/greyed out when a Role is selected in
> the Object Browser. This tool should always be available: regardless of
> what you're browsing, you might want to write a query.

They get disabled because there is no database associated with a role in
which to start the query tool.

Regards, Dave.


Re: Query tool greyed out

From
Erwin Brandstetter
Date:
On Sep 15, 10:28 am, dp...@postgresql.org (Dave Page) wrote:
> Rob McDonell wrote:
> > In both version 1.6 and 1.8 (can't remember earlier) the SQL button and
> > Query Tool menu item are inactive/greyed out when a Role is selected in
> > the Object Browser. This tool should always be available: regardless of
> > what you're browsing, you might want to write a query.
>
> They get disabled because there is no database associated with a role in
> which to start the query tool.


In a future release we could default to database "postgres" for global
objects, which is there for purposes like this one, isn't it?
It would be convenient to to open the SQL window directly from a role.
As long as we work on global objects like roles, the database does not
make a difference.

Of course, database "postgres" could be absent (pg versions < 7.4 or
dropped for some reason). We could further default to template1, but I
would rather warn the user that database "postgres" is missing and not
open the SQL window. We want to avoid trash in the template. And there
might be some potential for users to overlook what database they are
connected to, even if it is displayed clearly enough.
Still, I would definitely like the feature.


Regards
Erwin



Re: Query tool greyed out

From
Dave Page
Date:
Erwin Brandstetter wrote:
> On Sep 15, 10:28 am, dp...@postgresql.org (Dave Page) wrote:
>> Rob McDonell wrote:
>>> In both version 1.6 and 1.8 (can't remember earlier) the SQL button and
>>> Query Tool menu item are inactive/greyed out when a Role is selected in
>>> the Object Browser. This tool should always be available: regardless of
>>> what you're browsing, you might want to write a query.
>> They get disabled because there is no database associated with a role in
>> which to start the query tool.
> 
> 
> In a future release we could default to database "postgres" for global
> objects, which is there for purposes like this one, isn't it?
> It would be convenient to to open the SQL window directly from a role.
> As long as we work on global objects like roles, the database does not
> make a difference.
> 
> Of course, database "postgres" could be absent (pg versions < 7.4 or
> dropped for some reason). We could further default to template1, but I
> would rather warn the user that database "postgres" is missing and not
> open the SQL window. We want to avoid trash in the template. And there
> might be some potential for users to overlook what database they are
> connected to, even if it is displayed clearly enough.
> Still, I would definitely like the feature.

It would have to be the maintenance DB, but I'm not convinced that would
be overly obvious to the user. Conversely I'm not convinced it wouldn't
either now we have the database selector on the query tool, so if you
want to work up a patch...

/D


Re: Query tool greyed out

From
Erwin Brandstetter
Date:
Dave Page wrote:
> Erwin Brandstetter wrote:
> In a future release we could default to database "postgres" for global
> objects, which is there for purposes like this one, isn't it?
> It would be convenient to to open the SQL window directly from a role.
> As long as we work on global objects like roles, the database does not
> make a difference.
>
> Of course, database "postgres" could be absent (pg versions < 7.4 or
> dropped for some reason). We could further default to template1, but I
> would rather warn the user that database "postgres" is missing and not
> open the SQL window. We want to avoid trash in the template. And there
> might be some potential for users to overlook what database they are
> connected to, even if it is displayed clearly enough.
> Still, I would definitely like the feature.
>   
>
> It would have to be the maintenance DB, but I'm not convinced that would
> be overly obvious to the user. Conversely I'm not convinced it wouldn't
> either now we have the database selector on the query tool, so if you
> want to work up a patch...
>
> /D
>   

Of course, the maintenance DB!
I am afraid you won't be seeing C++ patches from me any time soon. But 
who can tell the future?

Regards
Erwin


Re: Query tool greyed out

From
"Dave Page"
Date:

> ------- Original Message -------
> From: Erwin Brandstetter <a9006241@unet.univie.ac.at>
> To: Dave Page <dpage@postgresql.org>
> Sent: 17/09/07, 17:29:37
> Subject: Re: [pgadmin-support] Query tool greyed out
> 
>
> Of course, the maintenance DB!
> I am afraid you won't be seeing C++ patches from me any time soon. But 
> who can tell the future?

What better way to cut your teeth? My first C++ was also the original guts of pgAdmin III !

:-)

/D