Re: sleep? - Mailing list pgsql-admin

From Greg Sabino Mullane
Subject Re: sleep?
Date
Msg-id 0817d53432c7b8dc53a6cc9c014261e9@biglumber.com
Whole thread Raw
In response to sleep?  (Don Drake <dondrake@gmail.com>)
List pgsql-admin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Is there a sleep function in plpgsql? I need to wait a period time
> 60 seconds) in a while loop.

You will need to us another language, such as plperl. You could
certainly create a sleep function and have your plpgsql call that:

CREATE FUNCTION sleep(INT) RETURNS TEXT LANGUAGE plperl AS
$$
select(undef,undef,undef,shift);
return "Time to wake up!";
$$;

SELECT sleep(2);

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200508211601
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFDCN3BvJuQZxSWSsgRAhtJAKD0QDRWb6kk+AGWHMPQqM7lwRAXKACgpHM0
EkA+7aOQoI3BzgLhkva53mQ=
=hD9m
-----END PGP SIGNATURE-----



pgsql-admin by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: sleep?
Next
From: Bricklen Anderson
Date:
Subject: Re: sleep?