Re: gettime() - a timeofday() alternative - Mailing list pgsql-hackers

From Tom Lane
Subject Re: gettime() - a timeofday() alternative
Date
Msg-id 20044.1124317070@sss.pgh.pa.us
Whole thread Raw
In response to Re: gettime() - a timeofday() alternative  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> 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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: gettime() - a timeofday() alternative
Next
From: Tom Lane
Date:
Subject: Re: SHM_LOCK under Linux ... do we use this?