pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: louis gonzales <gonzales@linuxlouis.net>
To: Andreas Kretschmer <akretschmer@spamfence.net>
Cc: pgsql-general@postgresql.org
Subject: Re: Is there anyway to...
Date: Thu, 02 Nov 2006 14:24:20 -0500
Message-ID: <454A45E4.8090409@linuxlouis.net> (raw)
In-Reply-To: <20061102190906.GA23069@KanotixBox>
References: <20061102171624.GE21312@localhost>
	<454A357E.6010409@linuxlouis.net>
	<454A394C.7020102@zijn-digital.com>
	<454A3EB6.8080806@linuxlouis.net>
	<20061102190906.GA23069@KanotixBox>

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@linuxlouis.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.gonzales@linuxlouis.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




view thread (29+ messages)  latest in thread

Message-ID: <454A45E4.8090409@linuxlouis.net>
Permalink:  ../454A45E4.8090409@linuxlouis.net/
Also on:    postgresql.org/message-id/454A45E4.8090409@linuxlouis.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gonzales@linuxlouis.net, akretschmer@spamfence.net, pgsql-general@postgresql.org
  Subject: Re: Is there anyway to...
  In-Reply-To: <454A45E4.8090409@linuxlouis.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox