Re: automated log-messages - Mailing list pgsql-sql

From J.H.M. Dassen (Ray)
Subject Re: automated log-messages
Date
Msg-id 20010112084332.A17096@cistron-office.nl
Whole thread Raw
In response to automated log-messages  (Joern Muehlencord <jomu@uni-paderborn.de>)
List pgsql-sql
On Fri, Jan 12, 2001 at 07:59:26 +0100, Joern Muehlencord wrote:
> I am trying to implement an automated log-message system for my
> application. For example, if a new user is inserted to my table "auth",
> I want to create a log message like: "user [name] added to system". Is
> it possible to add this message with triggers or rules?!

It can be done using a trigger procedure in Pl/pgSQL, using a "RAISE"
statement; see
http://postgresql.rmplc.co.uk/devel-corner/docs/postgres/plpgsql-description.htm#AEN6187

HTH,
Ray
-- 
"The proper place for a CAPSLOCK key is in a different hemisphere from you."Tom Christiansen in "Interface
Zen",http://slashdot.org/article.pl?sid=99/11/30/0954216


pgsql-sql by date:

Previous
From: Joern Muehlencord
Date:
Subject: automated log-messages
Next
From: Markus Wagner
Date:
Subject: Re: connecting to postgres server from Access