Email on Commit

Поиск
Список
Период
Сортировка
От denis@coralindia.com
Тема Email on Commit
Дата
Msg-id 001b01c1a59c$38b8c940$0232a8c0@coralindia.com
обсуждение исходный текст
Ответ на Table Names  (Rob <rob@obsidian.co.za>)
Список pgsql-novice
Hi

I have a TABLE (say "test"). I want to write a trigger which shall generate
and send an Email.

Trigger fires for ROW or STATEMENT level. I want to send mail for bunch of
records and not for every insert.

Is there any way to FIRE TRIGGER FOR EVERY COMMIT and not for any DML ???

e.g.
BEGIN;
INSERT INTO test VALUES (1,'Denis');
INSERT INTO test VALUES (2,'Denis');
INSERT INTO test VALUES (3,'Denis');
COMMIT;

I want to send an email with following text (as body)
"User xxx has inserted 3 records as details below :
        1,Denis
        2,Denis
        3,Denis"

AS SINGLE EMAIL.


Thanx

Denis



В списке pgsql-novice по дате отправления:

Предыдущее
От: "Steve Boyle \(Roselink\)"
Дата:
Сообщение: Re: Table Names
Следующее
От: "Brian Johnson"
Дата:
Сообщение: Porting existing postgresql databases to another machine