Search Postgresql Archives

Re: SLEEP in posgresql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux