Peter Eisentraut <peter_e@gmx.net> writes:
> Gevik Babakhani wrote:
>> I would like to have your opinion about the following behavior of TO_DATE.
>> Is this correct or a hidden feature?
> There are quite a few complaints in the archive about to_date's incorrect or
> questionable behavior. I'm sure this is one of them. This code needs a
> general, systematic review.
to_date has always been impressively lax about error-checking its input.
While I wouldn't object to tightening that up, surely checking a
weekday name against the rest of the date should be very far down the
priority list of checks to make.
regards, tom lane