pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kenneth Marshall <ktm@rice.edu>
To: Rob Wultsch <wultsch@gmail.com>
Cc: A. Kretschmer <andreas.kretschmer@schollglas.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: now() gives same time within the session
Date: Mon, 12 Jul 2010 08:26:52 -0500
Message-ID: <20100712132652.GD11581@aart.is.rice.edu> (raw)
In-Reply-To: <AANLkTil1a9TlztQSZEGuCeI0QUc5dq7yj84fQFmh851O@mail.gmail.com>
References: <418EC9BD4D7125488CCAC5C7C559A24803A9D0@MS10.lsc.net>
	<20100712111500.GA14489@a-kretschmer.de>
	<AANLkTil1a9TlztQSZEGuCeI0QUc5dq7yj84fQFmh851O@mail.gmail.com>

On Mon, Jul 12, 2010 at 06:11:31AM -0700, Rob Wultsch wrote:
> On Mon, Jul 12, 2010 at 4:15 AM, A. Kretschmer
> <andreas.kretschmer@schollglas.com> wrote:
> > In response to Atul.Goel@globaldatapoint.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?
> 
No, see section 9.9.4 of the manual.

Cheers,
Ken



view thread (8+ messages)  latest in thread

Message-ID: <20100712132652.GD11581@aart.is.rice.edu>
Permalink:  ../20100712132652.GD11581@aart.is.rice.edu/
Also on:    postgresql.org/message-id/20100712132652.GD11581@aart.is.rice.edu

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: ktm@rice.edu, wultsch@gmail.com, andreas.kretschmer@schollglas.com
  Subject: Re: now() gives same time within the session
  In-Reply-To: <20100712132652.GD11581@aart.is.rice.edu>

* 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