SLEEP in posgresql

Поиск
Список
Период
Сортировка
От Jasbinder Singh Bali
Тема SLEEP in posgresql
Дата
Msg-id a47902760710091956t558b8323nde3988fec49a0971@mail.gmail.com
обсуждение исходный текст
Ответы Re: SLEEP in posgresql  (Guy Rouillier <guyr-ml1@burntmail.com>)
Re: SLEEP in posgresql  (Michal Taborsky - Internet Mall <michal.taborsky@mall.cz>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Filip Rembiałkowski"
Дата:
Сообщение: Re: How to speedup intarray aggregate function?
Следующее
От: Guy Rouillier
Дата:
Сообщение: Re: SLEEP in posgresql