pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Don Drake <dondrake@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: sleep?
Date: Sun, 21 Aug 2005 16:41:33 -0600
Message-ID: <20050821224133.GB31904@winnie.fuhr.org> (raw)
In-Reply-To: <6c21003b050821122278e3d7d5@mail.gmail.com>
References: <6c21003b050821122278e3d7d5@mail.gmail.com>

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



view thread (15+ messages)  latest in thread

Message-ID: <20050821224133.GB31904@winnie.fuhr.org>
Permalink:  ../20050821224133.GB31904@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050821224133.GB31904@winnie.fuhr.org

 · 

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: mike@fuhr.org, dondrake@gmail.com
  Subject: Re: sleep?
  In-Reply-To: <20050821224133.GB31904@winnie.fuhr.org>
  References: <6c21003b050821122278e3d7d5@mail.gmail.com> <20050821224133.GB31904@winnie.fuhr.org>

* 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