From: Denis Zaitsev <zzz@anda.ru>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Very strange 'now' behaviour in nested triggers.
Date: Sun, 27 Jul 2003 17:09:51 +0600
Message-ID: <20030727170951.E1636@natasha.ward.six> (raw)
In-Reply-To: <49182.192.168.1.32.1059292036.squirrel@mainbox.archonet.com>
References: <20030726193947.B1636@natasha.ward.six>
<200307261514.16322.dev@archonet.com>
<20030727015832.D1636@natasha.ward.six>
<49182.192.168.1.32.1059292036.squirrel@mainbox.archonet.com>
On Sun, Jul 27, 2003 at 08:47:16AM +0100, Richard Huxton wrote:
>
> No- 'now',now() and CURRENT_TIMESTAMP all stay fixed during a transaction.
> The one that changes is timeofday() I think. See the "Functions and
> Operators" section for details.
Yes, indeed... Documentation describes this. And I haven't found
anything about 'now' that I used to say... I don't know why (my
memory leak?) :)
Thanks.
BTW, this text is at the bottom of the "Date/Time Functions and
Operators" section (functions-datetime.html):
SELECT CURRENT_TIMESTAMP;
SELECT now();
SELECT TIMESTAMP 'now';
Note: You do not want to use the third form when specifying a DEFAULT clause while
creating a table. The system will convert now to a timestamp as soon as the constant is
parsed, so that when the default value is needed, the time of the table creation would
be used! ...
It's nearly what you have written about. But I want to note <the time
of the table creation> phrase. Should it be fixed there?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: zzz@anda.ru, dev@archonet.com
Subject: Re: Very strange 'now' behaviour in nested triggers.
In-Reply-To: <20030727170951.E1636@natasha.ward.six>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox