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 B9F2852D2B for ; Wed, 17 Aug 2005 19:17:55 -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 52556-08 for ; Wed, 17 Aug 2005 22:17:53 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4068852C2C for ; Wed, 17 Aug 2005 19:17:50 -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 j7HMHoZj020045; Wed, 17 Aug 2005 18:17:50 -0400 (EDT) To: Bruce Momjian Cc: "Jim C. Nasby" , Brendan Jurd , pgsql-hackers@postgresql.org Subject: Re: gettime() - a timeofday() alternative In-reply-to: <200508172208.j7HM8sr17714@candle.pha.pa.us> References: <200508172208.j7HM8sr17714@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Wed, 17 Aug 2005 18:08:54 -0400" Date: Wed, 17 Aug 2005 18:17:50 -0400 Message-ID: <20044.1124317070@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200508/556 X-Sequence-Number: 71751 Bruce Momjian writes: > Jim C. Nasby wrote: >> On Sat, Aug 13, 2005 at 06:24:01PM -0400, Tom Lane wrote: >>> 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). >> Would it be reasonable to add one more timestamp that works the same >> inside and outside a function? In either case, can anyone think of a >> less-ambiguous name for timestamp_statement? > timestamp_client_statement? That highlights it is when the client sends > the statement. timestamp_command, maybe, would convey the right image. (I don't think we need yet a fourth flavor of this, nor do I see anything about it that "works differently inside and outside a function".) regards, tom lane