Re: Pet Peeves?

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Pet Peeves?
Дата
Msg-id 1233772947.4500.334.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на Re: Pet Peeves?  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Pet Peeves?  (Greg Stark <stark@enterprisedb.com>)
Re: Pet Peeves?  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-general
On Wed, 2009-02-04 at 14:09 +0900, Craig Ringer wrote:
> Guy Rouillier wrote:
> > Craig Ringer wrote:
> >> An internal job scheduler with the ability to fire jobs on certain
> >> events as well as on a fixed schedule could be particularly handy in
> >> conjunction with true stored procedures that could explicitly manage
> >> transactions.
> >
> > Craig, what kind of "events" are you thinking about?  Triggers are
> > already pieces of code that run upon "certain events", namely insert,
> > update or delete events.  What others do you have in mind?
>
> That's a good point, actually. I can't think of much you can't do with a
> trigger (SECURITY DEFINER if necessary) on a table. Not thinking straight.

True, but the trigger does its work while the user waits. If we have a
30 min task, we don't want to just tack that on to the end of a random
insert.

As A.M. says elsewhere, it would be good to have a trigger that fired a
NOTIFY that was picked up by a scheduled job that LISTENs every 10
minutes for certain events.

We need a place for code that is *not* directly initiated by a user's
actions, yet works as part of a closed loop system.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: field with Password
Следующее
От: Mark Roberts
Дата:
Сообщение: Re: Pet Peeves?