Re: Table (or Column?) level permissions - Mailing list pgsql-jdbc

From imad
Subject Re: Table (or Column?) level permissions
Date
Msg-id 1f30b80c0801141252k813289ex2e7a93f722c187e@mail.gmail.com
Whole thread Raw
In response to Table (or Column?) level permissions  ("Jonathan Mast" <jonathan.h.mast@gmail.com>)
List pgsql-jdbc
On Jan 14, 2008 10:37 PM, Jonathan Mast <jonathan.h.mast@gmail.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

pgsql-jdbc by date:

Previous
From: Juergen Reif
Date:
Subject: Pl/Java broken since Postgresql 8.3-rc1
Next
From: Josh Berkus
Date:
Subject: PostgreSQL + Java devlopers wanted for JavaOne