Thread: How to hide database structure

How to hide database structure

From
mydba@usa.com (Michael Gill)
Date:
How can I hide all details from users regarding data and structure,
limiting access to data through functions I create?

I don't want a user to be able to see the structure of a table with \d
{tablename} in psql.

TIA

Re: How to hide database structure

From
Bruno Wolff III
Date:
On Mon, Dec 22, 2003 at 09:10:43 -0800,
  Michael Gill <mydba@usa.com> wrote:
> How can I hide all details from users regarding data and structure,
> limiting access to data through functions I create?
>
> I don't want a user to be able to see the structure of a table with \d
> {tablename} in psql.

Don't give them any direct access to the tables and use a security definer
function to give them indirect access.

Re: How to hide database structure

From
Bruno Wolff III
Date:
On Tue, Dec 23, 2003 at 22:04:56 -0600,
  Bruno Wolff III <bruno@wolff.to> wrote:
> On Mon, Dec 22, 2003 at 09:10:43 -0800,
>   Michael Gill <mydba@usa.com> wrote:
> > How can I hide all details from users regarding data and structure,
> > limiting access to data through functions I create?
> >
> > I don't want a user to be able to see the structure of a table with \d
> > {tablename} in psql.
>
> Don't give them any direct access to the tables and use a security definer
> function to give them indirect access.

I made a mistake. The above only limits access to the data. You can't
limit access to the structure while allowing direct access to the database.
You will need to create a proxy application/server if you want to do this.