Re: SLEEP in posgresql - Mailing list pgsql-general

From Robert Treat
Subject Re: SLEEP in posgresql
Date
Msg-id 200710101205.43961.robert@omniti.com
Whole thread Raw
In response to Re: SLEEP in posgresql  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
List pgsql-general
On Wednesday 10 October 2007 01:00, Jasbinder Singh Bali wrote:
> I'm using Postgresql Version 8.1.4. on fedora core 6
> I'm pretty sure that pg_sleep is not implemented in 8.1.
> Am not sure what is the work around
>

Yeah can code your own sleep function in plpgsql, but it tends to be resource
intensive. Better would probably be to use an external lang, like this:

CREATE OR REPLACE FUNCTION otools.sleep(integer)
RETURNS integer
AS $$
my ($seconds) = @_; return sleep($seconds);
$$ LANGUAGE 'PLPERLU';

--
Robert Treat
Database Architect
http://www.omniti.com

pgsql-general by date:

Previous
From: Luis Vargas
Date:
Subject: fmgr_info_cxt_security() modifies variable?
Next
From: merlino
Date:
Subject: extracting multiple results from a set of tuples