X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B84445300B for ; Sat, 13 Aug 2005 16:51:23 -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 54600-05 for ; Sat, 13 Aug 2005 19:51:19 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by svr1.postgresql.org (Postfix) with ESMTP id EA06253007 for ; Sat, 13 Aug 2005 16:51:14 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i22so771257wra for ; Sat, 13 Aug 2005 12:51:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ajBF6bQ+1stF1PkNRi6gGaO4OacqNRJF1JSPCpxRCPW4VWX3gi/JFpX10JKn+2IlqwPicaeZuP/bp0a3YmGIHrQWQ8G19DcCEUUMLU64NwR7X9aqY5RP53UK93n1sJ29fSYnWUF47sU/YDaBYUqSOpWai7mgQ6n5Jfb/aTWUGXU= Received: by 10.54.31.55 with SMTP id e55mr2669134wre; Sat, 13 Aug 2005 12:51:16 -0700 (PDT) Received: by 10.54.141.14 with HTTP; Sat, 13 Aug 2005 12:51:16 -0700 (PDT) Message-ID: <37ed240d05081312511423cb58@mail.gmail.com> Date: Sun, 14 Aug 2005 05:51:16 +1000 From: Brendan Jurd To: Bruce Momjian , pgsql-hackers@postgresql.org Subject: Re: gettime() - a timeofday() alternative In-Reply-To: <200508131435.j7DEZU013689@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <37ed240d0508122330105cbf1@mail.gmail.com> <200508131435.j7DEZU013689@candle.pha.pa.us> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.087 tagged_above=0 required=5 tests=[AWL=0.063, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/395 X-Sequence-Number: 71590 On 8/14/05, Bruce Momjian wrote: > Brendan Jurd wrote: > > > We already have a TODO for this: > > > > > > * Add transaction_timestamp(), statement_timestamp(), clock_t= imestamp() > > > functionality > > > > I like the idea of having a function for statement start time. I > > think I'll incorporate it into my patch. > > Regarding the statement_timestamp() ... if the entire query path is parser -> rewriter -> planner/optimiser -> executor, what point in that path would be considered the true start of the "statement"? I would assume that it's right at the beginning, when it is first handed to the parser, but that's a very naive assumption.