Re: [HACKERS] Niladic functions

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: [HACKERS] Niladic functions
Дата
Msg-id 36E49C7A.115B9732@alumni.caltech.edu
обсуждение исходный текст
Ответ на Niladic functions  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Ответы Re: [HACKERS] Niladic functions  ("D'Arcy" "J.M." Cain <darcy@druid.net>)
Список pgsql-hackers
> The "Integrated Document" on the web page has the following paragraph 
> in the section "CREATE TABLE" in chapter 20.
> In the current release (v6.4), Postgres evaluates all default 
> expressions at the time the table is defined. Hence, functions which 
> are "non-cacheable" such as CURRENT_TIMESTAMP may not produce the 
> desired effect. For the particular case of date/time types, one can 
> work around this behavior by using "DEFAULT TEXT 'now'" instead of 
> "DEFAULT 'now'" or "DEFAULT CURRENT_TIMESTAMP". This forces Postgres 
> to consider the constant a string type and then to convert the value 
> to timestamp at runtime.
> 
> This appears to be untrue.  Is this a change since 6.4 or is there
> some cases where using CURRENT_TIMESTAMP will not do the expected 
> thing?

Sorry for being slow, but exactly which of the several assertions in the
above paragraph are not true? Just the DEFAULT CURRENT_TIMESTAMP
behavior?

> Also, the title of the document (The PostgreSQL Development Team) 
> seems to be incorrect.

My browser shows that as the second line, just under the title
"PostgreSQL", as I intended. What browser are you using?
                     - Tom


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Developers globe
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: [HACKERS] palloc.h again