Обсуждение: Table (or Column?) level permissions

Поиск
Список
Период
Сортировка

Table (or Column?) level permissions

От
"Jonathan Mast"
Дата:
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?

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'm echoing the queries on the webpage, and these queries will work when manually copied into the pgAdmin.

thanks,
jhmast

Re: Table (or Column?) level permissions

От
imad
Дата:
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