Granting privileges on views to group roles

Started by Marc Balmeralmost 19 years ago2 messagesgeneral
Jump to latest
#1Marc Balmer
marc@msys.ch

I am having a hard time here with PostgreSQL 8.2.4... What I want to do
is rather simple:

I have two login roles, user_A and admin_A, and a group role, group_A.
user_A is member of group_A

I create a table t_data, owned by admin_A
I create a view v_data, owned by admin_A
Now I grant SELECT privilege on view v_data to group_A

I would by now assume that user_A can SELECT data on v_data, but he can
not.

What am I doing wrong here? According to the docs, I should be able to
GRANT on views to group roles.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Marc Balmer (#1)
Re: Granting privileges on views to group roles

Marc Balmer <marc@msys.ch> writes:

I have two login roles, user_A and admin_A, and a group role, group_A.
user_A is member of group_A

I create a table t_data, owned by admin_A
I create a view v_data, owned by admin_A
Now I grant SELECT privilege on view v_data to group_A

I would by now assume that user_A can SELECT data on v_data, but he can
not.

Maybe you should show us exactly what you did, rather than a handwavy
description of what you think you did. The exact error message would
be handy too.

regards, tom lane