Alarm function in PL/pgSQL

From: Jon Smark <jon(dot)smark(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Alarm function in PL/pgSQL
Date: 2011-07-18 21:38:59
Message-ID: 1311025139.73351.YahooMailClassic@web112801.mail.gq1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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".

Thanks in advance!
Jon

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2011-07-18 21:42:56 Re: pg_upgrade does not translate tablespace location to new cluster
Previous Message Bruce Momjian 2011-07-18 21:25:28 Re: Documentation issue