Search Postgresql Archives

Re: question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luis Castillo <luiscastillor@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux