Skip site navigation (1) Skip section navigation (2)

Re: now() does not change within a transaction

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: now() does not change within a transaction
Date: 2002-04-18 15:50:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
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                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-sql by date

Next:From: Tom LaneDate: 2002-04-18 16:15:43
Subject: Re: SQL Query Optimization
Previous:From: Josh BerkusDate: 2002-04-18 15:43:53
Subject: Re: SQL Query Optimization

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group