Re: Triggers: How to make one that fires at a certain

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: Triggers: How to make one that fires at a certain
Дата
Msg-id 1030369827.22995.19.camel@linda
обсуждение исходный текст
Ответ на Triggers: How to make one that fires at a certain time of day?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список 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 по дате отправления:

Предыдущее
От: dima
Дата:
Сообщение: Re: Triggers: How to make one that fires at a certain time
Следующее
От: Richard Ray
Дата:
Сообщение: Permissions for system tables