Erwin Brandstetter wrote:
> On Sep 15, 10:28 am, [email protected] (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