From: Jim C. Nasby <jnasby@pervasive.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Brendan Jurd <direvus@gmail.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: gettime() - a timeofday() alternative
Date: Wed, 17 Aug 2005 17:07:18 -0500
Message-ID: <20050817220718.GL95876@pervasive.com> (raw)
In-Reply-To: <26263.1123971841@sss.pgh.pa.us>
References: <37ed240d0508122330105cbf1@mail.gmail.com>
<200508131435.j7DEZU013689@candle.pha.pa.us>
<37ed240d05081312511423cb58@mail.gmail.com>
<26263.1123971841@sss.pgh.pa.us>
On Sat, Aug 13, 2005 at 06:24:01PM -0400, Tom Lane wrote:
> 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).
ISTM that it would be useful to be able to use timestamp_statement
within a function though... although I guess timestamp_clock might
suffice in most cases. Another consideration is that this is a potential
source of confusion; people could easily think that timestamp_statement
would operate the same inside a function as it would outside.
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?
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com 512-569-9461
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: jnasby@pervasive.com, tgl@sss.pgh.pa.us, direvus@gmail.com, pgman@candle.pha.pa.us
Subject: Re: gettime() - a timeofday() alternative
In-Reply-To: <20050817220718.GL95876@pervasive.com>
References: <37ed240d0508122330105cbf1@mail.gmail.com> <200508131435.j7DEZU013689@candle.pha.pa.us> <37ed240d05081312511423cb58@mail.gmail.com> <26263.1123971841@sss.pgh.pa.us> <20050817220718.GL95876@pervasive.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox