Re: BUG #1630: Wrong conversion in to_date() function. See example. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1630: Wrong conversion in to_date() function. See example.
Date
Msg-id 22259.1114613632@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1630: Wrong conversion in to_date() function. See example.  (Michael Fuhr <mike@fuhr.org>)
Responses Re: BUG #1630: Wrong conversion in to_date() function. See example.
Re: BUG #1630: Wrong conversion in to_date() function. See
List pgsql-bugs
Michael Fuhr <mike@fuhr.org> writes:
> If anything I'd expect 2005-02-32 to be rejected as invalid, but I
> don't know the history or rationale behind to_date's behavior.

It is rejected by the standard date input converter:

regression=# select '2005-02-32'::date;
ERROR:  date/time field value out of range: "2005-02-32"
HINT:  Perhaps you need a different "datestyle" setting.

However we consider that to_date() exists to be Oracle compatible,
and so I would regard this as a bug if and only if Oracle does
something different with the same input.  Anyone know?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Juan Miguel Paredes
Date:
Subject: Re: BUG #1630: Wrong conversion in to_date() function. See example.
Next
From: Tom Lane
Date:
Subject: Re: BUG #1629: subquery IN returns incorrect results