From: | Robert Treat <robert(at)omniti(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>, "Harpreet Dhaliwal" <harpreet(dot)dhaliwal01(at)gmail(dot)com>, "Guy Rouillier" <guyr-ml1(at)burntmail(dot)com> |
Subject: | Re: SLEEP in posgresql |
Date: | 2007-10-10 16:05:43 |
Message-ID: | 200710101205.43961.robert@omniti.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Mason | 2007-10-10 16:42:41 | Re: disjoint union types |
Previous Message | Henrik | 2007-10-10 16:02:51 | Disable triggers per transaction 8.2.3 |