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

From Tom Lane
Subject Re: gettime() - a timeofday() alternative
Date
Msg-id 26263.1123971841@sss.pgh.pa.us
Whole thread Raw
In response to Re: gettime() - a timeofday() alternative  (Brendan Jurd <direvus@gmail.com>)
Responses Re: gettime() - a timeofday() alternative
List pgsql-hackers
Brendan Jurd <direvus@gmail.com> 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


pgsql-hackers by date:

Previous
From: mark@mark.mielke.cc
Date:
Subject: Re: gettime() - a timeofday() alternative
Next
From: Tom Lane
Date:
Subject: Re: distributed performance testing