Re: Function with now() | time 'now' | etc...

From: Cedar Cox <cedarc(at)visionforisrael(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: edipoelder(at)ig(dot)com(dot)br, pgsql-sql(at)postgresql(dot)org
Subject: Re: Function with now() | time 'now' | etc...
Date: 2001-03-29 11:38:24
Message-ID: Pine.LNX.4.21.0103291337250.19150-100000@nanu.visionforisrael.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


> edipoelder(at)ig(dot)com(dot)br writes:
> > It doesn't getting different times on each execution. I also tried put
> > "timestamp 'now'" insted "now()". What am I doing wrong?
>
> now() is defined to return the time of the start of the current
> transaction. It won't change value inside a transaction. See
> http://www.postgresql.org/devel-corner/docs/postgres/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT

What about CURRENT_TIMESTAMP? (This is standard SQL isn't it?)

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Cedar Cox 2001-03-29 11:44:29 Re: SELECT ... FOR UPDATE
Previous Message Christof Glaser 2001-03-29 09:27:37 Re: Self-Referencing