From: | "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com> |
---|---|
To: | "Harpreet Dhaliwal" <harpreet(dot)dhaliwal01(at)gmail(dot)com> |
Cc: | "Guy Rouillier" <guyr-ml1(at)burntmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: SLEEP in posgresql |
Date: | 2007-10-10 05:00:13 |
Message-ID: | a47902760710092200x369a26ack847fd571753a6da8@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
Jas
On 10/10/07, Harpreet Dhaliwal <harpreet(dot)dhaliwal01(at)gmail(dot)com> wrote:
>
> I think pg_sleep is not implemented in 8.1 and earlier versions. Is there
> any alternative if someone is using versions before 8.2 ?
>
> On 10/9/07, Guy Rouillier <guyr-ml1(at)burntmail(dot)com > wrote:
> >
> > 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
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
> >
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Saito | 2007-10-10 05:30:25 | Re: about Command Prompt. |
Previous Message | Harpreet Dhaliwal | 2007-10-10 04:50:09 | Re: SLEEP in posgresql |