Re: Triggers: How to make one that fires at a certain - Mailing list pgsql-general

From Oliver Elphick
Subject Re: Triggers: How to make one that fires at a certain
Date
Msg-id 1030369827.22995.19.camel@linda
Whole thread Raw
In response to Triggers: How to make one that fires at a certain time of day?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
On Mon, 2002-08-26 at 14:25, Jean-Christian Imbeault wrote:
> I'd like to have a table that generates a row entry everyday at
> midnight. Is there anyway to create a trigger (or something else) that
> would fire at midnight and insert a row into a table?

No; the database knows nothing about the passing of time.

The normal way to do this is to use cron to invoke a script that will
insert the row.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Seeing then that all these things shall be dissolved,
      what manner of persons ought ye to be? You ought to
      live holy and godly lives as you look forward to the
      day of God and speed its coming."
                                II Peter 3:11,12


pgsql-general by date:

Previous
From: dima
Date:
Subject: Re: Triggers: How to make one that fires at a certain time
Next
From: Richard Ray
Date:
Subject: Permissions for system tables