Re: question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Luis Castillo <luiscastillor(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: question
Date: 2008-10-08 01:20:53
Message-ID: 20034.1223428853@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Luis Castillo <luiscastillor(at)gmail(dot)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

In response to

  • question at 2008-10-06 08:27:04 from Luis Castillo

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-10-08 02:04:21 Re: ERROR: column "datpath" does not exist
Previous Message Saptarshi Guha 2008-10-08 01:04:16 Re: Efficiency of inner joins across multiple tables