now() does not change within a transaction

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: now() does not change within a transaction
Date: 2002-04-18 14:04:35
Message-ID: 200204181204.OAA11703@rodos
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.
Regards, Christoph

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Albrecht Berger 2002-04-18 14:43:25 DISTINCT ON ... without distinct null values ?
Previous Message Karel Zak 2002-04-18 13:26:13 Re: Migrating Oracle to PostgreSQL