Use of 'now'

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>
Subject: Use of 'now'
Date: 2001-11-14 01:38:41
Message-ID: 200111140138.fAE1cfC10668@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Tatsuo found the following paragraph in the docs, in datatype.sgml:

---------------------------------------------------------------------------

<literal>'now'</literal> is resolved when the value is inserted,
<literal>'current'</literal> is resolved every time the value is
retrieved. So you probably want to use <literal>'now'</literal> in most
applications. (Of course you <emphasis>really</emphasis> want to use
<literal>CURRENT_TIMESTAMP</literal>, which is equivalent to
<literal>'now'</literal>.)

---------------------------------------------------------------------------

This seems wrong to me. What does it mean when it says 'current' is
resolved every time the value is retrieved?

Also, we mention 'now' a lot in the documentation. Should we change
those to CURRENT_TIMESTAMP? I have change that in the FAQ.

--
Bruce Momjian | http://candle.pha.pa.us
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

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2001-11-14 02:27:19 Re: Use of 'now'
Previous Message Todd Gauthier 2001-11-13 17:48:08 Re: Book pl/pgsql functions

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2001-11-14 01:51:08 Re: Quick question
Previous Message Christopher Kings-Lynne 2001-11-14 01:32:26 Re: Quick question