Re: gettime() - a timeofday() alternative

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: gettime() - a timeofday() alternative
Date: 2005-08-13 22:24:01
Message-ID: 26263.1123971841@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Brendan Jurd <direvus(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-08-13 22:29:58 Re: distributed performance testing
Previous Message mark 2005-08-13 21:35:38 Re: gettime() - a timeofday() alternative

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-08-13 22:27:29 Re: [PATCH] Clarify issues with SPI and C language function limitations
Previous Message Tom Lane 2005-08-13 22:22:06 Re: [PATCH] Proposed: Have SPI_connect fail if there is no current snapshot