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 9070B52F80 for ; Sat, 13 Aug 2005 19:24:06 -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 23669-02 for ; Sat, 13 Aug 2005 22:24:02 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4E4DC529F5 for ; Sat, 13 Aug 2005 19:24:00 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j7DMO1Tj026264; Sat, 13 Aug 2005 18:24:01 -0400 (EDT) To: Brendan Jurd Cc: Bruce Momjian , pgsql-hackers@postgresql.org Subject: Re: gettime() - a timeofday() alternative In-reply-to: <37ed240d05081312511423cb58@mail.gmail.com> References: <37ed240d0508122330105cbf1@mail.gmail.com> <200508131435.j7DEZU013689@candle.pha.pa.us> <37ed240d05081312511423cb58@mail.gmail.com> Comments: In-reply-to Brendan Jurd message dated "Sun, 14 Aug 2005 05:51:16 +1000" Date: Sat, 13 Aug 2005 18:24:01 -0400 Message-ID: <26263.1123971841@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200508/397 X-Sequence-Number: 71592 Brendan Jurd writes: > 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"? IIRC, what we actually intended that to mean is the time of receipt of the current interactive command --- that is, it gets set in the postgres.c outer loop, not anywhere in the parser/etc path. Otherwise there's not a unique answer (consider statements issued inside SQL functions for instance). regards, tom lane