| От | Andreas 'ads' Scherbaum |
|---|---|
| Тема | to_date_valid() |
| Дата | |
| Msg-id | 57786490.9010201@wars-nicht.de обсуждение исходный текст |
| Ответы |
Re: to_date_valid()
Re: to_date_valid() |
| Список | pgsql-hackers |
Hello, we have customers complaining that to_date() accepts invalid dates, and returns a different date instead. This is a known issue: http://sql-info.de/postgresql/notes/to_date-to_timestamp-gotchas.html On the other hand this leads to wrong dates when loading dates into the database, because the database happily accepts invalid dates and ends up writing something completely different into the table. The attached patch adds a new function "to_date_valid()" which will validate the date and return an error if the input and output date do not match. Tests included, documentation update as well. -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера