Skip site navigation (1) Skip section navigation (2)

Re: sleep?

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: sleep?
Date: 2005-08-21 20:03:03
Message-ID: 0817d53432c7b8dc53a6cc9c014261e9@biglumber.com (view raw or flat)
Thread:
Lists: 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(at)turnstep(dot)com
PGP Key: 0x14964AC8 200508211601
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

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



In response to

  • sleep? at 2005-08-21 19:22:25 from Don Drake

pgsql-admin by date

Next:From: Bricklen AndersonDate: 2005-08-21 20:26:14
Subject: Re: sleep?
Previous:From: Don DrakeDate: 2005-08-21 19:22:25
Subject: sleep?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group