From: | elein <elein(at)varlena(dot)com> |
---|---|
To: | Sean Hamilton <sehamilt(at)chfund(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Rules on Select |
Date: | 2006-05-05 23:40:14 |
Message-ID: | 20060505234014.GE18214@varlena.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)varlena(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
From | Date | Subject | |
---|---|---|---|
Next Message | Terry Fielder | 2006-05-05 23:56:53 | Re: EnterpriseDB |
Previous Message | Matthew Hixson | 2006-05-05 23:22:13 | EnterpriseDB |