Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2SJM6U58571 for ; Wed, 28 Mar 2001 14:22:06 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f2SJM2w19214; Wed, 28 Mar 2001 14:22:02 -0500 (EST) To: edipoelder@ig.com.br cc: pgsql-sql@postgresql.org Subject: Re: Function with now() | time 'now' | etc... In-reply-to: <200103281859.f2SIxDU52128@mail.postgresql.org> References: <200103281859.f2SIxDU52128@mail.postgresql.org> Comments: In-reply-to edipoelder@ig.com.br message dated "Wed, 28 Mar 2001 15:59:08 -0300" Date: Wed, 28 Mar 2001 14:22:02 -0500 Message-ID: <19211.985807322@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/586 X-Sequence-Number: 2256 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