pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
auto execute
4+ messages / 4 participants
[nested] [flat]

* auto execute
@ 2002-10-11 03:19  Ric Mañalac <ric.manalac@webphilippines.com>
  0 siblings, 3 replies; 4+ messages in thread

From: Ric Mañalac @ 2002-10-11 03:19 UTC (permalink / raw)
  To: pgsql-php

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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: auto execute
@ 2002-10-11 03:52  Justin Clift <justin@postgresql.org>
  parent: Ric Mañalac <ric.manalac@webphilippines.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Justin Clift @ 2002-10-11 03:52 UTC (permalink / raw)
  To: Ric Mañalac <ric.manalac@webphilippines.com>; +Cc: pgsql-php

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: auto execute
@ 2002-10-11 05:35  Keary Suska <hierophant@pcisys.net>
  parent: Ric Mañalac <ric.manalac@webphilippines.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Keary Suska @ 2002-10-11 05:35 UTC (permalink / raw)
  To: pgsql-php

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"




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: auto execute
@ 2002-10-11 12:09  Bruno Wolff III <bruno@wolff.to>
  parent: Ric Mañalac <ric.manalac@webphilippines.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Bruno Wolff III @ 2002-10-11 12:09 UTC (permalink / raw)
  To: Ric Mañalac <ric.manalac@webphilippines.com>; +Cc: pgsql-php

On Fri, Oct 11, 2002 at 11:19:10 +0800,
  Ric Mañalac <ric.manalac@webphilippines.com> 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.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-10-11 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-11 03:19 auto execute Ric Mañalac <ric.manalac@webphilippines.com>
2002-10-11 03:52 ` Justin Clift <justin@postgresql.org>
2002-10-11 05:35 ` Keary Suska <hierophant@pcisys.net>
2002-10-11 12:09 ` Bruno Wolff III <bruno@wolff.to>

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