From: | Guy Rouillier <guyr-ml1(at)burntmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: SLEEP in posgresql |
Date: | 2007-10-10 03:53:47 |
Message-ID: | 470C4CCB.6050209@burntmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jasbinder Singh Bali wrote:
> 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.
Hmmm, I'm looking at section 9.9.5 Delaying Execution in the PostgreSQL
8.2.0 Documentation. Following the example presented there, I fired up
psql and ran the following:
postgres=# select current_timestamp; select pg_sleep(3); select
current_timestamp;
now
----------------------------
2007-10-09 23:50:32.649-04
(1 row)
pg_sleep
----------
(1 row)
now
----------------------------
2007-10-09 23:50:35.774-04
(1 row)
Seems to be working. What version are you using and on what platform?
--
Guy Rouillier
From | Date | Subject | |
---|---|---|---|
Next Message | Ow Mun Heng | 2007-10-10 04:07:58 | replacing single quotes |
Previous Message | detrox yang | 2007-10-10 03:33:29 | Re: how to ignore invalid byte sequence for encoding without using sql_ascii? |