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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: edipoelder(at)ig(dot)com(dot)br
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Function with now() | time 'now' | etc...
Date: 2001-03-28 19:22:02
Message-ID: 19211.985807322@sss.pgh.pa.us
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

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dirk Lutzebaeck 2001-03-28 19:32:23 Re: counting distinct rows on more than one column
Previous Message Martin Jacobs 2001-03-28 19:16:54 Re: String REPLACE function