Thomas Kellerer wrote:
>>> 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
See for example
http://www.postgresql.org/message-id/[email protected]
that this is known and accepted behaviour.
However,
http://www.postgresql.org/message-id/[email protected]
so I guess that it was not intended, but since it has been that way
for long enough it would be too painful to change it.
So actually my original answer "it is by design" is probably wrong.
"Based upon" should be read as "inspired by" rather than
"compatible with".
Yours,
Laurenz Albe
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general