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 69FDED6D84 for ; Sun, 21 Aug 2005 19:41:40 -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 68358-07 for ; Sun, 21 Aug 2005 22:41:39 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 836B1D6D8B for ; Sun, 21 Aug 2005 19:41:37 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j7LMfYHt012579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 21 Aug 2005 16:41:36 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j7LMfXf7032121; Sun, 21 Aug 2005 16:41:33 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j7LMfXCA032120; Sun, 21 Aug 2005 16:41:33 -0600 (MDT) (envelope-from mfuhr) Date: Sun, 21 Aug 2005 16:41:33 -0600 From: Michael Fuhr To: Don Drake Cc: pgsql-admin@postgresql.org Subject: Re: sleep? Message-ID: <20050821224133.GB31904@winnie.fuhr.org> References: <6c21003b050821122278e3d7d5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c21003b050821122278e3d7d5@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 required=5 tests=[AWL=0.005] X-Spam-Level: X-Archive-Number: 200508/254 X-Sequence-Number: 18573 On Sun, Aug 21, 2005 at 02:22:25PM -0500, Don Drake wrote: > Is there a sleep function in plpgsql? I need to wait a period time (60 > seconds) in a while loop. SELECT oid::regprocedure FROM pg_proc WHERE proname ILIKE '%sleep%' OR prosrc ILIKE '%sleep%'; oid ----- (0 rows) When I need a sleep function on the server side I write one in C, PL/Perl, PL/Tcl, PL/Python, etc. PostgreSQL 8.0 and later have an internal pg_usleep() function but it's not exposed to the user. I asked about exposing it recently but didn't see any replies (it was in response to a message in pgsql-committers; I suppose I should have asked in pgsql-hackers instead). -- Michael Fuhr