From: Rick Schumeyer <rschumeyer@ieee.org>
To: pgsql-sql@postgresql.org
Subject: simulating row ownership
Date: Fri, 7 Jan 2005 11:52:07 -0500
Message-ID: <001901c4f4d9$395726f0$0200a8c0@dell8200> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rschumeyer@ieee.org
Subject: Re: simulating row ownership
In-Reply-To: <001901c4f4d9$395726f0$0200a8c0@dell8200>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox