Use of 'now'

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Use of 'now'
Дата
Msg-id 200111140138.fAE1cfC10668@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: Use of 'now'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-docs
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@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

В списке pgsql-docs по дате отправления:

Предыдущее
От: Todd Gauthier
Дата:
Сообщение: Re: Book pl/pgsql functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Use of 'now'