From: | dipti shah <shahdipti1980(at)gmail(dot)com> |
---|---|
To: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Grant column level permissions |
Date: | 2010-04-08 11:41:27 |
Message-ID: | v2hd5b05a951004080441vcc0cd984y6225c606f1f148fd@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Okay. I think I got it but it is not working the way it should. I have given
select permission on one column but still it is displaying both the columns.
Could you please tell me what is wrong.
techdb=# GRANT SELECT (description), UPDATE (description) ON techtable TO
user1;
GRANT
sysdb=> select * from techtable;
number | description
--------+-------------
(0 rows)
techdb=>
Thanks.
On Thu, Apr 8, 2010 at 5:02 PM, dipti shah <shahdipti1980(at)gmail(dot)com> wrote:
> Yup. I read it and tired couple of ways but couldn't figured out how to
> specify column names. It gives me below error message and hence, I asked for
> the example.
>
> GRANT { { SELECT | INSERT | UPDATE | REFERENCES } ( *column* [, ...] )
>
> [,...] | ALL [ PRIVILEGES ] ( *column* [, ...] ) }
> ON [ TABLE ] *tablename* [, ...]
> TO { [ GROUP ] *rolename* | PUBLIC } [, ...] [ WITH GRANT OPTION ]
>
>
> techdb=# grant select(column['description']) ON techtable TO user1;
> ERROR: syntax error at or near "column"
> LINE 1: grant select(column['description']) ON techtable TO user1;
> ^
>
> Thanks,
> Dipti.
>
>
> On Thu, Apr 8, 2010 at 4:13 PM, Michael Glaesemann <grzm(at)seespotcode(dot)net>wrote:
>
>>
>> On Apr 8, 2010, at 4:22 , dipti shah wrote:
>>
>> > Hi, from postgesql features list mentioned at
>> > http://www.postgresql.org/about/press/features84.html, I came to know
>> that
>> > it is possible to grant column level permissions.
>>
>> <snip/>
>>
>> > Could anyone please give me the example of how to grant column level
>> > permissions? Basically, I want to give permissions to set of
>> > users(user-group) to only couple of columns in my table.
>>
>> Have you reviewed the fine documentation?
>> <http://www.postgresql.org/docs/8.4/interactive/sql-grant.html>
>>
>> Michael Glaesemann
>> grzm seespotcode net
>>
>>
>>
>>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michał Pawlikowski | 2010-04-08 11:48:32 | Re: Grant column level permissions |
Previous Message | dipti shah | 2010-04-08 11:32:27 | Re: Grant column level permissions |