Re: to_date() and invalid dates
От | Thomas Kellerer |
---|---|
Тема | Re: to_date() and invalid dates |
Дата | |
Msg-id | lbjf1v$a2v$1@ger.gmane.org обсуждение исходный текст |
Ответ на | Re: to_date() and invalid dates (Albe Laurenz <laurenz.albe@wien.gv.at>) |
Ответы |
Re: to_date() and invalid dates
|
Список | pgsql-general |
Albe Laurenz, 20.01.2014 15:29: >> I asked this a while back already: >> >> select to_date('2013-02-31', 'yyyy-mm-dd'); >> >> will not generate an error (unlike e.g. Oracle) > > This is by design. When I previously asked this question the answer as "this is based on Oracle's to_date()": http://postgresql.1045698.n5.nabble.com/to-char-accepting-invalid-dates-td4598597.html#a4608551 Oracle rejects such a date, so this is highly irritating for users coming from Oracle. >> However in the release notes of 9.2.3[1] it is mentioned that >> >> - Reject out-of-range dates in to_date() (Hitoshi Harada) >> > This commit only rejects dates that are before 4713 BC and 5874898 AD, > which cannot be printed reasonably. Ah, then the comment is somewhat misleading, thanks for the clarification. Regards Thomas
В списке pgsql-general по дате отправления: