| From: | "Rick Schumeyer" <rschumeyer(at)ieee(dot)org> |
|---|---|
| To: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | simulating row ownership |
| Date: | 2005-01-07 16:52:07 |
| Message-ID: | 001901c4f4d9$395726f0$0200a8c0@dell8200 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
I have a table where I want everyone to be able to be able to insert and
select.
But they should only be able to update and delete rows that they "own". The
table
has a column indicating the owner.
What is the best way to accomplish this? I'm not real familiar with rules,
but it seems
that I can do this with rules for update and delete applied to the table.
Someone
had suggesting using views, but since I can't update a view in postgres, I'm
not sure that views help here.
I assume if I use rules, then I need to grant all to public, and let the
rules prevent
users from updating the wrong rows?
Any advice is appreciated.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2005-01-07 18:29:00 | Re: View with Union and update rule - fails |
| Previous Message | Filip Jirsák | 2005-01-07 11:10:21 | View with Union and update rule - fails |