row access

Started by Bamberoalmost 22 years ago5 messagesgeneral
Jump to latest
#1Bambero
robert@agiti.net

Hi

Like in the subject. I have few tables i relations with themselves.
There are many users that may insert a rows. But i want that only owner
can modify or delete a row.

I found somwhere an information that can use here LOCK, but I don't know
how.

Please help

Bambero

#2Bruno Wolff III
bruno@wolff.to
In reply to: Bambero (#1)
Re: row access

On Sat, Jun 05, 2004 at 18:35:29 +0200,
Bambero <robert@agiti.net> wrote:

Hi

Like in the subject. I have few tables i relations with themselves.
There are many users that may insert a rows. But i want that only owner
can modify or delete a row.

I found somwhere an information that can use here LOCK, but I don't know
how.

You don't want LOCK, you want GRANT and REVOKE.

#3Scot L. Harris
webid@cfl.rr.com
In reply to: Bambero (#1)
Re: row access

On Sat, 2004-06-05 at 12:35, Bambero wrote:

Hi

Like in the subject. I have few tables i relations with themselves.
There are many users that may insert a rows. But i want that only owner
can modify or delete a row.

I found somwhere an information that can use here LOCK, but I don't know
how.

Please help

Bambero

You can set permissions on a per table basis. But to implement per row
permissions I think you will have to roll your own.

Probably need to add a column for who owns the row and the check that
when you perform operations on the row.

--
Scot L. Harris <webid@cfl.rr.com>

#4Bambero
robert@agiti.net
In reply to: Bruno Wolff III (#2)
Re: row access

Bruno Wolff III wrote:

On Sat, Jun 05, 2004 at 18:35:29 +0200,
Bambero <robert@agiti.net> wrote:

Hi

Like in the subject. I have few tables i relations with themselves.
There are many users that may insert a rows. But i want that only owner
can modify or delete a row.

I found somwhere an information that can use here LOCK, but I don't know
how.

You don't want LOCK, you want GRANT and REVOKE.

GRANT for row access ?

If you have any ideas example please

#5Bruno Wolff III
bruno@wolff.to
In reply to: Bambero (#4)
Re: row access

On Sat, Jun 05, 2004 at 18:50:56 +0200,
Bambero <robert@agiti.net> wrote:

GRANT for row access ?

It looks like you may be expecting individuals to own rows. I didn't
read that into your original post. GRANTing appropiate rights could allow
a table owner to be able to INSERT, UPDATE and DELETE while others could
only INSERT.

If you have some concept of a row owner, then you will probably want to
use triggers or rules.