Re: Is there anyway to...

From: louis gonzales <gonzales(at)linuxlouis(dot)net>
To: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is there anyway to...
Date: 2006-11-02 19:24:20
Message-ID: 454A45E4.8090409@linuxlouis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-sql

To all who replied, first, thank you! Second, I simply said 'dirty'
never said dislike or anything like that. I've used and use cron for
different OS related operations and have for years. I LOVE cron itself.

What I mean with 'dirty' is that I'm trying to take away as much as
possible from external influences to the database action I want to happen.

Fine so let's say when the instructor creates the user profile, this can
trigger the creation of a sequence, say, but IF the instructor doesn't
visit that student's profile for a month, I want something that,
independent of any other action, will be either incrementing or
decrementing that sequence. So when the instructor does go back to
visit the student profile it will only show/flag the status if the time
has elapsed. Is there like a sleep() function that postgresql has?
That could be part of the plan. So sleep(24hours) - pseudo code - wake
up and increment something initiate trigger to see if a requirement has
been met - say 10day or 30day or 1year has elapsed - if so, set a flag
attribute to the student profile.

During that 30 days, the instructor won't care what's going on behind
the scenes, they just care when the time has elapsed, that they will get
a flag, to say, "hey buddy, over here, this student hasn't fulfilled the
agreement."

Based on what everyone is saying, there is no such internal mechanism
function/trigger or otherwise, that can do independent actions.

Andreas Kretschmer wrote:

>louis gonzales <gonzales(at)linuxlouis(dot)net> schrieb:
>
>
>
>>Hey Brian,
>>Yeah I had considered this, using cron, I just feel like that is too dirty.
>>
>>
>
>Why?
>
>
>
>
>>Actually I didn't see Andreas' post, can someone forward that?
>>
>>
>
>Sorry, i posted to the list, and i can see my mail.
>
>
>
>
>>I'm running this application on Solaris 9. Ultimately what I want to know
>>is, is there something that is internal to postgresql that can be used that
>>doesn't need external action, to make it do some task?
>>
>>
>
>Take a look at http://pgfoundry.org/projects/pgjob/
>
>
>
>
>>Am I making any sense with how I'm asking this? I could of course have
>>cron do a scheduled task of checking/incrementing/decrementing and define
>>triggers to occur when one of the cron delivered actions sets the
>>appropriate trigger off, but are there other methods that are standard in
>>the industry or are we stuck with this type of external influence?
>>
>>
>
>I'm using PG on Linux-systems and use CRON for any tasks, without any
>problems. I can't understand your dislike...
>
>
>Andreas
>
>

--
Email: louis(dot)gonzales(at)linuxlouis(dot)net
WebSite: http://www.linuxlouis.net
"Open the pod bay doors HAL!" -2001: A Space Odyssey
"Good morning starshine, the Earth says hello." -Willy Wonka

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message imad 2006-11-02 19:32:21 Re: [GENERAL] Is there anyway to...
Previous Message A. Kretschmer 2006-11-02 19:17:01 Re: [GENERAL] Is there anyway to...

Browse pgsql-general by date

  From Date Subject
Next Message imad 2006-11-02 19:32:21 Re: [GENERAL] Is there anyway to...
Previous Message A. Kretschmer 2006-11-02 19:17:01 Re: [GENERAL] Is there anyway to...

Browse pgsql-sql by date

  From Date Subject
Next Message imad 2006-11-02 19:32:21 Re: [GENERAL] Is there anyway to...
Previous Message A. Kretschmer 2006-11-02 19:17:01 Re: [GENERAL] Is there anyway to...