SLEEP in posgresql

From: "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SLEEP in posgresql
Date: 2007-10-10 02:56:27
Message-ID: a47902760710091956t558b8323nde3988fec49a0971@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a while loop and I want to re-iterate after every 't' seconds.
I was reading up on the postgresql documentation that says pg_sleep(t)
should be handy.
However i doesn't work.

Instead of that, I re-engineered my while loop in the stored procedure as
follows.

while a=b loop
--do something
select pg_sleep(5);
end loop

I doubt this would work because when I try to run
SELECT pg_sleep(5) stand alone, it throws error.

I was wondering how to implement the SLEEP functionality here.

Thanks,
~Jas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message detrox yang 2007-10-10 03:33:29 Re: how to ignore invalid byte sequence for encoding without using sql_ascii?
Previous Message Filip Rembiałkowski 2007-10-10 02:30:29 Re: How to speedup intarray aggregate function?