Grants on rules - Mailing list pgsql-general

From Alberto Cabello Sanchez
Subject Grants on rules
Date
Msg-id 20040706072328.GA3312@guadiana.unex.es
Whole thread Raw
Responses Re: Grants on rules
List pgsql-general
Hi all,

I am trying to mimic a table's behaviour on a view thru rules. More
precisely, I have a table (say, my_table(field1,field2)) and a view
(my_view as select my_field from my_table). For allowing inserts into
the view, I have create a rule on "insert into my_view" doing instead
insert into my_table(field1,field2) values (NEW.field1,NULL). It works
fine, but...
I can GRANT or REVOKE privileges (SELECT, INSERT and so on) on my_view
and my_table, but insert into my_view is always allowed, even for users
that haven't SELECT or INSERT privileges neither on my_table or my_view.

How can I restrict the users that can insert into my_view?

Thank you for your answers.

--
-----------------------
Alberto Cabello Sánchez
alberto@unex.es
Servicio de Informática
924 289 351
-----------------------

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: enable thready safety on Mac OS X 10.3.4
Next
From: Clodoaldo Pinto Neto
Date:
Subject: Re: could not access file "$libdir/plpython" when restoring