X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id ED196D1B51A for ; Mon, 29 Sep 2003 13:17:07 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 79679-04 for ; Mon, 29 Sep 2003 10:16:42 -0300 (ADT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by svr1.postgresql.org (Postfix) with ESMTP id E1C38D1B53E for ; Mon, 29 Sep 2003 10:16:38 -0300 (ADT) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 982BA3F52; Mon, 29 Sep 2003 09:16:15 -0400 (EDT) From: "Dan Langille" To: Kerv Date: Mon, 29 Sep 2003 09:17:28 -0400 MIME-Version: 1.0 Subject: Re: now() in loop statement Cc: pgsql-sql@postgresql.org Message-ID: <3F77F8A8.10229.33B6CEFF@localhost> In-reply-to: X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/382 X-Sequence-Number: 15360 On 29 Sep 2003 at 15:58, Kerv wrote: > What is wrong with this function because the mytime variable contain the > same value in each iteration: From http://www.postgresql.org/docs/7.3/static/functions- datetime.html: It is important to realize that CURRENT_TIMESTAMP and related functions return the start time of the current transaction; their values do not change during the transaction. timeofday() returns the wall clock time and does advance during transactions. -- Dan Langille : http://www.langille.org/