Re: Filtering DatabaseMetaData to show only the items for which the current user has access - Mailing list pgsql-jdbc

From danap
Subject Re: Filtering DatabaseMetaData to show only the items for which the current user has access
Date
Msg-id 57D74D7E.8070907@itstriangle.com
Whole thread Raw
In response to Filtering DatabaseMetaData to show only the items for which the current user has access  ("Langley, Scott E" <slangley@scharp.org>)
List pgsql-jdbc
Langley, Scott E wrote:
> Hello PostgreSQL JDBC Developers,
>
> We have a desire to hide unneeded database objects from our database-challenged
> users - as they might see in a simple database viewer application - by removing
> their privileges on such objects.
>
> It appears that many database viewing applications, e.g., DbVisualizer, rely on
> what is returned by the JDBC driver’s DatabaseMetaData methods to determine
> which schemas and tables to display to the user:
>
> ~
 > ~
 > ~
>
> If you would accept a patch along these lines, which approach would be preferable?
>
> Thanks for your consideration.
> Scott Langley

Seems what you are asking the JDBC driver to do is the work of what
should be done by a client application. Yes MySQL does offer this
more advanced control of users.

Most of this can be accomplished as indicated, filtering through the
DatabaseMetaData.getTables(catalog, schemaPattern, tableNamePattern,
tableTypes)

MyJSQLView does exactly this and some basic filtering can be accomplished
via a configuration file, myjsqlview.conf. If not edit the DatabaseProperties
Java code to only allow, the particular aspects desired. This might be much
easier then editing the JDBC code to add this feature.

Overall seems the additional control should be requested via the server
features.

danap
http://myjsqlview.com




pgsql-jdbc by date:

Previous
From: "Langley, Scott E"
Date:
Subject: Filtering DatabaseMetaData to show only the items for which the current user has access
Next
From: danap
Date:
Subject: MyJSQLView Version 7.08 Released