Re: Table (or Column?) level permissions

From: imad <immaad(at)gmail(dot)com>
To: "Jonathan Mast" <jonathan(dot)h(dot)mast(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Table (or Column?) level permissions
Date: 2008-01-14 20:52:27
Message-ID: 1f30b80c0801141252k813289ex2e7a93f722c187e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Jan 14, 2008 10:37 PM, Jonathan Mast <jonathan(dot)h(dot)mast(at)gmail(dot)com> wrote:
> We have some JSP code that accesses a table. The problem is that some
> fields will not return results when selected for, nor will they throw
> exceptions.
>
> My question is: Can certain columns of a table be restricted in terms of who
> can access them?

No, can't be restricted like this.

>
> The queries are of the form:
>
> SELECT * FROM myTbl WHERE col_A="someValue";
>
> col_A works, but col_B, col_C, etc. don't.

I can think of views as a solution, just don't include the columns which
you don't want to share. You will have to issue same number of commands
as you would have issued to revoke permissions from certain users.

>
> I'm echoing the queries on the webpage, and these queries will work when
> manually copied into the pgAdmin.
>
> thanks,
> jhmast
>

--Imad

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Josh Berkus 2008-01-15 01:44:21 PostgreSQL + Java devlopers wanted for JavaOne
Previous Message Jonathan Mast 2008-01-14 17:37:25 Table (or Column?) level permissions