From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Per Jensen <pj(at)net-es(dot)dk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Index scan vs. Seq scan on timestamps |
Date: | 2004-12-12 03:08:03 |
Message-ID: | 20041212030803.GA43646@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Dec 07, 2004 at 09:25:20AM +0100, Per Jensen wrote:
> Den Tue, Dec 07, 2004 at 03:13:04AM -0000 eller der omkring skrev Andrew - Supernews:
> > On 2004-12-07, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > > Is there a way to say "just take the value of this function at the start
> > > of the transaction and then have it be constant" in a query?
> >
> > Why not use CURRENT_TIMESTAMP, etc., which do exactly that?
>
> Because when using transactions, CURRENT_TIMESTAMP does not advance, but is fixed
> to time of session start
CURRENT_TIMESTAMP is fixed to the time of transaction start, not
session start; this is documented and observable behavior. Can you
demonstrate otherwise? If so, on what version of PostgreSQL?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | Guy Rouillier | 2004-12-12 04:40:42 | Re: Best practice in postgres |
Previous Message | Michael Fuhr | 2004-12-12 02:34:42 | Re: using postgresql functions from php |