Guido Staub wrote:
> timeofday() works better than current_timestamp, but I have to use a
> CAST-Statement to make it possible to calculate the elapsed time.
> What do you mean with change during the statement?
> The only change I see after using timeofday() is that the calculated time for
> doing the query the first time and a second time again differ a llittle bit,
> although that query1 and query2 are equal in the transaction and that I've used
> the same relation.
> Guido Staub
Here is an example of timeofday() changing during a query:
test=> CREATE TEMP TABLE xx AS select timeofday() UNION select
timeofday();
SELECT
test=> SELECT * FROM xx;
timeofday
--------------------------------------
Tue Oct 01 17:09:23.381304 2002 CEST
Tue Oct 01 17:09:23.381393 2002 CEST
(2 rows)
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073