Re: Function with now() | time 'now' | etc... - Mailing list pgsql-sql

From Tom Lane
Subject Re: Function with now() | time 'now' | etc...
Date
Msg-id 19211.985807322@sss.pgh.pa.us
Whole thread Raw
In response to Function with now() | time 'now' | etc...  (edipoelder@ig.com.br)
Responses Re: Function with now() | time 'now' | etc...  (Cedar Cox <cedarc@visionforisrael.com>)
List pgsql-sql
edipoelder@ig.com.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


pgsql-sql by date:

Previous
From: edipoelder@ig.com.br
Date:
Subject: Function with now() | time 'now' | etc...
Next
From: Dirk Lutzebaeck
Date:
Subject: Re: counting distinct rows on more than one column