starting a stored procedure+rule AFTER an insert

Поиск
Список
Период
Сортировка
От Bima Djaloeis
Тема starting a stored procedure+rule AFTER an insert
Дата
Msg-id 77f6bcdd0710050231h108603abgd0f312a7ec02f9ec@mail.gmail.com
обсуждение исходный текст
Ответы Re: starting a stored procedure+rule AFTER an insert  (Douglas McNaught <doug@mcnaught.org>)
Список pgsql-general
Hi, Newbie here,

I have implemented a stored procedure that writes out the newest DB entry on insert, and combined it with a rule.

1) create function newcache() returns void AS 'newCache', 'newCache' language c;
2) create rule newcacherule AS on insert to caches do also select newcache();

The problem is that newcacherule fires BEFORE the insert has taken place, so effectively, I always just get the 2nd newest entry to write into my text file while the newest entry is "stuck in the queue" until a new insert come. How can I execute my rule AFTER the insert has taken place?

Thanks for reading!

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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Very asynchrnous replication system
Следующее
От: "Dave"
Дата:
Сообщение: Foreign Key for PHP serialized data - possible?