Re: [GENERAL] Alarm function in PL/pgSQL

2011-07-21 Thread Sim Zacks
On 07/19/2011 01:35 AM, Jon Smark wrote: Hi, 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. Thanks for the prompt reply. Just to clarify: you are saying th

Re: [GENERAL] Alarm function in PL/pgSQL

2011-07-18 Thread Craig Ringer
On 19/07/2011 6:35 AM, Jon Smark wrote: Thanks for the prompt reply. Just to clarify: you are saying that the function that is called with a given periodicity must be so from *outside* PG, ie, from the client application, right? I mean, there is no way strictly internal to PG to have a function

Re: [GENERAL] Alarm function in PL/pgSQL

2011-07-18 Thread Darren Duncan
Jon Smark wrote: 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. Thanks for the prompt reply. Just to clarify: you are saying that the function that is called

Re: [GENERAL] Alarm function in PL/pgSQL

2011-07-18 Thread Jon Smark
Hi, > 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. Thanks for the prompt reply. Just to clarify: you are saying that the function that is called with a g

Re: [GENERAL] Alarm function in PL/pgSQL

2011-07-18 Thread Merlin Moncure
On Mon, Jul 18, 2011 at 4:38 PM, Jon Smark 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 wan

[GENERAL] Alarm function in PL/pgSQL

2011-07-18 Thread Jon Smark
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 give