Search Postgresql Archives

Re: Rules on Select

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

 



This is best done by using a trigger on the table. 
http://www.varlena.com/GeneralBits/38.php shows how
to do it with both a trigger and with a rule.

--elein
elein@xxxxxxxxxxx

On Fri, May 05, 2006 at 04:48:28PM -0400, Sean Hamilton wrote:
> I have to log each time a user selects data from a table by inserting  
> record in another table. 
> For example
> I have table xzy
> user test selects id, name from table xyz.
> I want to insert into table xyz_log
> user, action, fields, timestamp
> test, select, id name, 12/1/05 02:00:21
> 
> How can i do this using a Rule or Trigger?
> 
> Thanks
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
>       message can get through to the mailing list cleanly
> 


[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