X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7E418D6F14 for ; Tue, 23 Aug 2005 11:42:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 84103-01 for ; Tue, 23 Aug 2005 14:42:25 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.194]) by svr1.postgresql.org (Postfix) with ESMTP id E5FB0D6E2A for ; Tue, 23 Aug 2005 11:42:23 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i17so3486wra for ; Tue, 23 Aug 2005 07:42:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=WaIQmH1IN+apIoj8CWfVNX6OQYlBiUwrrmkG4hJxewpFGdANDXZd7LSojnCivXAFn0QxdVRjG4m+Hh1jYkoCWumy5UA+IZ9JuGcnVqDNgjYYqyEv5YNke6OmQRpIgH5PydxAdjj7m2UX0Woj0dyKwQGZtubkKXt1HWg9w8cFHuI= Received: by 10.54.135.20 with SMTP id i20mr2292458wrd; Tue, 23 Aug 2005 07:42:28 -0700 (PDT) Received: by 10.54.94.11 with HTTP; Tue, 23 Aug 2005 07:42:27 -0700 (PDT) Message-ID: <6c21003b05082307427ea67279@mail.gmail.com> Date: Tue, 23 Aug 2005 09:42:27 -0500 From: Don Drake To: Michael Fuhr Subject: Re: sleep? Cc: John DeSoi , Guido Barosio , pgsql-admin@postgresql.org In-Reply-To: <20050822140133.GA60020@winnie.fuhr.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4034_26651.1124808147967" References: <6c21003b050821122278e3d7d5@mail.gmail.com> <6c21003b05082206341411de2d@mail.gmail.com> <20050822140133.GA60020@winnie.fuhr.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.07 required=5 tests=[AWL=-0.011, HTML_30_40=0.056, HTML_MESSAGE=0.001, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/282 X-Sequence-Number: 18601 ------=_Part_4034_26651.1124808147967 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sorry for the delay in replying. The use-case that I have is the following. I'm writing a job-control=20 tracking sub-system that will store when jobs are started, finished, failed= ,=20 etc. I would like to have the ability to have a process that is requesting= =20 to start, to actually wait a specified period time before starting. It coul= d=20 wait for another job to finish. I'm writing this in plpgsql since I'm=20 storing status in the db. -Don On 8/22/05, Michael Fuhr wrote: >=20 > On Mon, Aug 22, 2005 at 08:34:29AM -0500, Don Drake wrote: > > I agree that a basic function (non-CPU intensive sleep) like this shoul= d=20 > be > > built in. >=20 > It's being discussed in pgsql-hackers: >=20 > http://archives.postgresql.org/pgsql-hackers/2005-08/msg00633.php >=20 > Do you have any use cases in addition to what's already been > mentioned? Sleeping isn't really a database operation, so there > needs to be some justification for making it a standard function. >=20 > -- > Michael Fuhr >=20 --=20 Donald Drake President Drake Consulting http://www.drakeconsult.com/ http://www.MailLaunder.com/ http://www.mobilemeridian.com/ 312-560-1574 ------=_Part_4034_26651.1124808147967 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sorry for the delay in replying.

The use-case that I have is the following.  I'm writing a job-control tracking sub-system  that will store when jobs are started, finished, failed, etc.  I would like to have the ability to have a process that is requesting to start, to actually wait a specified period time before starting.  It could wait for another job to finish.  I'm writing this in plpgsql since I'm storing status in the db.

-Don

On 8/22/05, Michael Fuhr <mike@fuhr= .org> wrote:
On Mon, Aug 22, 2005 at 08:34:29AM -0500, Don Drake wrote:
> I agree = that a basic function (non-CPU intensive sleep) like this should be
>= built in.

It's being discussed in pgsql-hackers:

http://archives.postgresql.org/pgsql-hackers/2005-08/msg00633.php
Do you have any use cases in addition to what's already been
mentioned= ?  Sleeping isn't really a database operation, so there
needs = to be some justification for making it a standard function.

--
Michael Fuhr



= --
Donald Drake
President
Drake Consulting
http://www.drakeconsult.com/
http://www.MailLaunder.com/
http://www.mobilemeridian.com/
312-560-1574
------=_Part_4034_26651.1124808147967--