Re: triggers on date?

Lists: pgsql-general
From: Lev Lvovsky <lists1(at)sonous(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: triggers on date?
Date: 2002-07-02 05:25:23
Message-ID: Pine.LNX.4.43.0207012224050.22899-100000@ground0.sonous.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

is it possible to create a trigger when the system time has reached the
date of a particular record? I know this is possible with an external
script, but I'm not quite sure how to go about making it fairly
real-time...

thanks!
-lev


From: Jason Earl <jason(dot)earl(at)simplot(dot)com>
To: Lev Lvovsky <lists1(at)sonous(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: triggers on date?
Date: 2002-07-02 18:16:42
Message-ID: 87lm8u3shh.fsf@npa01zz001.simplot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


If it only needs to be /fairly/ realtime, then you could use cron to
fire a script every minute. Otherwise you could write an external
long-running program that listens for notifies.

Jason

Lev Lvovsky <lists1(at)sonous(dot)com> writes:

> is it possible to create a trigger when the system time has reached the
> date of a particular record? I know this is possible with an external
> script, but I'm not quite sure how to go about making it fairly
> real-time...
>
> thanks!
> -lev
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly


From: Lev Lvovsky <lists1(at)sonous(dot)com>
To: Jason Earl <jason(dot)earl(at)simplot(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: triggers on date?
Date: 2002-07-02 18:42:25
Message-ID: Pine.LNX.4.43.0207021140330.23618-100000@ground0.sonous.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


this is for a billing system, at this point it's a toss-up b/w the
following:

1. a script grabs clients which need billing on a nightly basis
2. a script grabs clients which need billing for a particular time
interval (every hour, ever two hours etc...).

what methods are used for making this close to real-time - constant
polling?

thanks!
-lev

On 2 Jul 2002, Jason Earl wrote:

>
> If it only needs to be /fairly/ realtime, then you could use cron to
> fire a script every minute. Otherwise you could write an external
> long-running program that listens for notifies.
>
> Jason
>
> Lev Lvovsky <lists1(at)sonous(dot)com> writes:
>
> > is it possible to create a trigger when the system time has reached the
> > date of a particular record? I know this is possible with an external
> > script, but I'm not quite sure how to go about making it fairly
> > real-time...
> >
> > thanks!
> > -lev
> >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
>

--
personal site :: www.sonous.com
rave site :: raves.sonous.com
I'm a DJ! site :: djkgb.sonous.com

"...is the best show on television. Its cooler than the other side of the
pillow." -Kevin King


From: Jason Earl <jason(dot)earl(at)simplot(dot)com>
To: Lev Lvovsky <lists1(at)sonous(dot)com>
Cc: Jason Earl <jason(dot)earl(at)simplot(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: triggers on date?
Date: 2002-07-03 07:59:56
Message-ID: 87vg7x5jib.fsf@npa01zz001.simplot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


With cron you could make your script "grab clients" every minute. If
you need even smaller increments between checks then the thing to do
would be to write a long running program.

Jason

Lev Lvovsky <lists1(at)sonous(dot)com> writes:

> this is for a billing system, at this point it's a toss-up b/w the
> following:
>
> 1. a script grabs clients which need billing on a nightly basis
> 2. a script grabs clients which need billing for a particular time
> interval (every hour, ever two hours etc...).
>
> what methods are used for making this close to real-time - constant
> polling?
>
> thanks!
> -lev
>
> On 2 Jul 2002, Jason Earl wrote:
>
> >
> > If it only needs to be /fairly/ realtime, then you could use cron to
> > fire a script every minute. Otherwise you could write an external
> > long-running program that listens for notifies.
> >
> > Jason
> >
> > Lev Lvovsky <lists1(at)sonous(dot)com> writes:
> >
> > > is it possible to create a trigger when the system time has reached the
> > > date of a particular record? I know this is possible with an external
> > > script, but I'm not quite sure how to go about making it fairly
> > > real-time...
> > >
> > > thanks!
> > > -lev
> > >
> > >
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 3: if posting/reading through Usenet, please send an appropriate
> > > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > > message can get through to the mailing list cleanly
> >
>
> --
> personal site :: www.sonous.com
> rave site :: raves.sonous.com
> I'm a DJ! site :: djkgb.sonous.com
>
>
> "...is the best show on television. Its cooler than the other side of the
> pillow." -Kevin King