Search Postgresql Archives

Re: Alarm function in PL/pgSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 18, 2011 at 4:38 PM, Jon Smark <jon.smark@xxxxxxxxx> wrote:
> Hi,
>
> Is it possible to set an alarm within a PL/pgSQL function?  By "alarm"
> I mean a function which is invoked some defined time in the future,
> even after the original function has terminated and returned a value
> to the client.
>
> I want an invocation of function FOO to set a "state" column of a given
> table row to "temporary".  After a predefined period (say, one hour),
> function BAR should then automatically be invoked; this latter function
> would among other things change the "state" column to "permanent".

I don't think this is really possible with postgres PLs generally.
Typically what you have to do is have a function that is called on an
interval that checks for alarms and runs them.

merlin

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux