Re: now() gives same time within the session

From: Rob Wultsch <wultsch(at)gmail(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: now() gives same time within the session
Date: 2010-07-12 13:11:31
Message-ID: AANLkTil1a9TlztQSZEGuCeI0QUc5dq7yj84fQFmh851O@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jul 12, 2010 at 4:15 AM, A. Kretschmer
<andreas(dot)kretschmer(at)schollglas(dot)com> wrote:
> In response to Atul(dot)Goel(at)globaldatapoint(dot)com :
>> Hi,
>>
>>
>>
>> I need to log the start and end time of the procedures in a table. But the
>> start and end time are same. This is how I recreated the issue.
>>
>>
>>
>> create table test_time (time timestamp);
>>
>> delete from  test_time;
>>
>> insert into test_time select now();
>
>
> Use timeofday() instead, now() returns the transaction starting time.

Is this part of the SQL standard?

--
Rob Wultsch
wultsch(at)gmail(dot)com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Thom Brown 2010-07-12 13:23:55 Re: now() gives same time within the session
Previous Message Kevin Grittner 2010-07-12 12:41:36 Re: Pooling in Core WAS: Need help in performance tuning.