Re: current_timestamp after queries - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: current_timestamp after queries
Date
Msg-id 20020930095526.GA19086@svana.org
Whole thread Raw
In response to current_timestamp after queries  (Guido Staub <staub@gik.uni-karlsruhe.de>)
Responses Re: current_timestamp after queries  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
On Mon, Sep 30, 2002 at 11:44:17AM +0200, Guido Staub wrote:

[some current_timestamp stuff]

> I think that the accuracy is not good enough because I've started two
> BEGIN statements and some time is elapsing between them. Am I right?
> Or does anybody know a better solution to store the elapsed time after
> some queries without writing some code in C or JAVA?

Perhaps you're looking for timeofday()?

kleptog=# begin; select timeofday(); select timeofday(); commit;
BEGIN
              timeofday
-------------------------------------
 Mon Sep 30 19:54:41.559605 2002 EST
(1 row)

              timeofday
-------------------------------------
 Mon Sep 30 19:54:41.560018 2002 EST
(1 row)

COMMIT

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

pgsql-general by date:

Previous
From: Adam Witney
Date:
Subject: Re: Beta2 - A Late Announcement
Next
From: Jochem van Dieten
Date:
Subject: Re: [JDBC] Prepared statement performance...