Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 99069475452 for ; Thu, 18 Apr 2002 11:50:58 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g3IFovL13125; Thu, 18 Apr 2002 11:50:57 -0400 (EDT) From: Bruce Momjian Message-Id: <200204181550.g3IFovL13125@candle.pha.pa.us> Subject: Re: now() does not change within a transaction In-Reply-To: <200204181204.OAA11703@rodos> To: Christoph Haller Date: Thu, 18 Apr 2002 11:50:57 -0400 (EDT) Cc: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL97 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200204/227 X-Sequence-Number: 7491 Christoph Haller wrote: > Hi pgsql-sql list, > I did some testing around tables using a column > timestamp with time zone not null default now(). > I have noticed a valuable feature: > As long as being inside a transaction initiated by > begin; > the return value of the now() function does not change. > Is this intended - as written in the documentation? > Can I rely on it, so future releases of PostgreSQL > will act the same. Yes, this is intended and will not change. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026