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

Re: sleep?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Don Drake <dondrake(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: sleep?
Date: 2005-08-21 22:41:33
Message-ID: 20050821224133.GB31904@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-admin
On Sun, Aug 21, 2005 at 02:22:25PM -0500, Don Drake wrote:
> Is there a sleep function in plpgsql? I need to wait a period time (60 
> seconds) in a while loop.

SELECT oid::regprocedure
FROM pg_proc
WHERE proname ILIKE '%sleep%' OR prosrc ILIKE '%sleep%';
 oid 
-----
(0 rows)

When I need a sleep function on the server side I write one in C,
PL/Perl, PL/Tcl, PL/Python, etc.  PostgreSQL 8.0 and later have an
internal pg_usleep() function but it's not exposed to the user.  I
asked about exposing it recently but didn't see any replies (it was
in response to a message in pgsql-committers; I suppose I should
have asked in pgsql-hackers instead).

-- 
Michael Fuhr

In response to

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

pgsql-admin by date

Next:From: Michael SchmidtDate: 2005-08-22 00:43:33
Subject: Numerical variables in pqsql statements
Previous:From: DanDate: 2005-08-21 21:16:37
Subject: DB restore fails W2k.

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