Skip site navigation (1) Skip section navigation (2)

Re: Timestamps Look Incorrect?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Lane Van Ingen" <lvaningen(at)esncc(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Timestamps Look Incorrect?
Date: 2005-09-28 21:30:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
"Lane Van Ingen" <lvaningen(at)esncc(dot)com> writes:
> I have used localtimestamp, now(), and
> to_char(localtimestamp,'HH24:MI:SS.US') to display current time at different
> points in the stored procedure; even though I have requested microseconds,
> all of the results being returned are all the same: the time that is shown
> on the very first  RAISE NOTICE is exactly the same as the last one, even
> though I stored the time into different variables.

That's what it's supposed to do.  Please read the documentation:
You need to use timeofday() if you want to measure intra-transaction

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Michael GlaesemannDate: 2005-09-28 21:33:10
Subject: Re: Timestamps Look Incorrect?
Previous:From: Lane Van IngenDate: 2005-09-28 20:12:44
Subject: Timestamps Look Incorrect?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group