Re: Rules on Select - Mailing list pgsql-general

From elein
Subject Re: Rules on Select
Date
Msg-id 20060505234014.GE18214@varlena.com
Whole thread Raw
In response to Rules on Select  (Sean Hamilton <sehamilt@chfund.org>)
List pgsql-general
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@varlena.com

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@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

pgsql-general by date:

Previous
From: "chris smith"
Date:
Subject: Re: simple md5 authentication problems
Next
From: Matthew Hixson
Date:
Subject: EnterpriseDB