From: J.H.M. Dassen (Ray) <jdassen@cistron-office.nl>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: automated log-messages
Date: Fri, 12 Jan 2001 08:43:32 +0100
Message-ID: <20010112084332.A17096@cistron-office.nl> (raw)
In-Reply-To: <3A5EAB4E.DF530384@intra-muehlencord.de>
References: <3A5EAB4E.DF530384@intra-muehlencord.de>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jdassen@cistron-office.nl
Subject: Re: automated log-messages
In-Reply-To: <20010112084332.A17096@cistron-office.nl>
References: <3A5EAB4E.DF530384@intra-muehlencord.de> <20010112084332.A17096@cistron-office.nl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox