Re: [SQL] simulating row ownership

2005-01-11 Thread Ron Peterson
On Tue, Jan 11, 2005 at 08:38:21AM -0500, rpeterso wrote: > CREATE RULE lock_test_user_update > AS ON UPDATE TO test > WHERE old.aname = CURRENT_USER > DO INSTEAD nothing; > > CREATE RULE lock_test_user_delete > AS ON DELETE TO test > WHERE old.aname = CURRENT_USER > DO INSTEAD nothing; For your

Re: [SQL] simulating row ownership

2005-01-11 Thread Ron Peterson
On Fri, Jan 07, 2005 at 11:52:07AM -0500, Rick Schumeyer wrote: > 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

Re: [SQL] simulating row ownership

2005-01-07 Thread Michael Fuhr
On Fri, Jan 07, 2005 at 11:52:07AM -0500, Rick Schumeyer wrote: > 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 does the owner col

[SQL] simulating row ownership

2005-01-07 Thread Rick Schumeyer
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 see