auto execute
am 11.10.2002 05:19:10 von ric.manalac
hello,
how can i make postgres to execute a query automatically during
scheduled times?
here's my situation. i store records on a table. these records should be
removed 1 day after they were created.
thanks.
ric
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
Re: auto execute
am 11.10.2002 05:52:36 von Justin Clift
Hi Ric,
You could use a cron job that executes a SQL statement to delete the old
records.
:-)
Regards and best wishes,
Justin Clift
Ric Mañalac wrote:
>
> hello,
>
> how can i make postgres to execute a query automatically during
> scheduled times?
>
> here's my situation. i store records on a table. these records should be
> removed 1 day after they were created.
>
> thanks.
>
> ric
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Re: auto execute
am 11.10.2002 07:35:18 von Keary Suska
on 10/10/02 9:19 PM, ric.manalac@webphilippines.com purportedly said:
> how can i make postgres to execute a query automatically during
> scheduled times?
>
> here's my situation. i store records on a table. these records should be
> removed 1 day after they were created.
AFAIK, not solely within postgres. There needs to be some trigger point,
which could be a cron-invoked function, a trigger based on some action on
the table, or "cleanup" function that is called every time your app runs.
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: auto execute
am 11.10.2002 14:09:07 von Bruno Wolff III
On Fri, Oct 11, 2002 at 11:19:10 +0800,
Ric Mañalac wrote:
> hello,
>
> how can i make postgres to execute a query automatically during
> scheduled times?
>
> here's my situation. i store records on a table. these records should be
> removed 1 day after they were created.
If they new to not be visible exactly 1 day after they are created, you
can use a view to do that. You will still want to run a cron job to
actually delete the records.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org