Triggers/Rules that insert/update other tables and permissions - Mailing list pgsql-general

From Oberpriller, Wade D.
Subject Triggers/Rules that insert/update other tables and permissions
Date
Msg-id 5B7014A44B89494E830AD32859FBC85802B38644@nsc-msg01.network.com
Whole thread Raw
List pgsql-general
Hello,

I have a schema like so:

Table1 is read-only to PUBLIC;
Table2 is hidden completely from PUBLIC;
View1 is a writable view derived from Table1;

If a user other than the super-user writes to View1, rules are triggered to
actually write to Table1 and this works fine. However, if I add a
rule/trigger on Table1, so that whenever Table1 is written to, Table2 will
be written to, I get a permissions error when I try to write to View1.

Do I have to make Table2 accessable, shouldn't the permissions be passed on
like a setuid program?

Wade Oberpriller                 http://www.storagetek.com
Software Development             Phone: (763) 424-1538
StorageTek: MRDC                        (800) 328-9108 ext. 1538
wade_oberpriller@storagetek.com  Fax:   (763) 391-1095

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: db grows and grows
Next
From: Jason Earl
Date:
Subject: Re: db grows and grows