Documentation patch for to_date and to_timestamp

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Documentation patch for to_date and to_timestamp
Дата
Msg-id 52DEC39D.3000505@pinpointresearch.com
обсуждение исходный текст
Список pgsql-hackers
The attached patch is in response to ongoing mailing-list questions
regarding perceived weirdness in to_timestamp and to_date.

The patch modifies doc/src/sgml/func.sgml to add "(see usage notes)" in
the description column for to_date and to_timestamp in the Formatting
Functions table and adds the following two list items to the start of
the usage notes for date/time conversion:

The to_date and to_timestamp functions exist to parse unusual input
formats that cannot be handled by casting. These functions interpret
input liberally and with minimal error checking so the conversion has
the potential to yield unexpected results. Read the following notes and
test carefully before use. Casting is the preferred method of conversion
wherever possible.

Input to to_date and to_timestamp is not restricted to normal ranges
thus to_date('20096040','YYYYMMDD') returns 2014-01-17 rather than
generating an error.

Cheers,
Steve


Вложения

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Incorrectly reporting config errors
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Incorrectly reporting config errors