Re: question - Mailing list pgsql-general

From Tom Lane
Subject Re: question
Date
Msg-id 20034.1223428853@sss.pgh.pa.us
Whole thread Raw
In response to question  (Luis Castillo <luiscastillor@gmail.com>)
Responses Re: question  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
Luis Castillo <luiscastillor@gmail.com> writes:
> I would like to know how  can I control in my database the rows that a
> user has inserted. I mean many users can insert information in a table
> but when trying to update the information I want that a user can change
> only those rows inserted by him. Is this possible with Postgresql?

Sure, if you add a column that records which user inserted the row, and
then make a BEFORE UPDATE trigger that throws an error if it doesn't
match.

            regards, tom lane

pgsql-general by date:

Previous
From: Saptarshi Guha
Date:
Subject: Re: Efficiency of inner joins across multiple tables
Next
From: "Scott Marlowe"
Date:
Subject: Re: ERROR: column "datpath" does not exist