pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <greg@turnstep.com>
To: pgsql-admin@postgresql.org
Subject: Re: sleep?
Date: Sun, 21 Aug 2005 20:03:03 -0000
Message-ID: <0817d53432c7b8dc53a6cc9c014261e9@biglumber.com> (raw)
In-Reply-To: <6c21003b050821122278e3d7d5@mail.gmail.com>


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





view thread (15+ messages)  latest in thread

Message-ID: <0817d53432c7b8dc53a6cc9c014261e9@biglumber.com>
Permalink:  ../0817d53432c7b8dc53a6cc9c014261e9@biglumber.com/
Also on:    postgresql.org/message-id/0817d53432c7b8dc53a6cc9c014261e9@biglumber.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: greg@turnstep.com
  Subject: Re: sleep?
  In-Reply-To: <0817d53432c7b8dc53a6cc9c014261e9@biglumber.com>
  References: <6c21003b050821122278e3d7d5@mail.gmail.com> <0817d53432c7b8dc53a6cc9c014261e9@biglumber.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox