Обсуждение: Documentation patch for to_date and to_timestamp

Поиск
Список
Период
Сортировка

Documentation patch for to_date and to_timestamp

От
Steve Crawford
Дата:
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


Вложения