Re: BUG #1630: Wrong conversion in to_date() function. See example.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Ariel E(dot) Carná/Elizabeth Sosa <acarna(at)tarifar(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1630: Wrong conversion in to_date() function. See example.
Date: 2005-04-27 14:53:52
Message-ID: 22259.1114613632@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Fuhr <mike(at)fuhr(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-04-27 14:57:42 Re: BUG #1629: subquery IN returns incorrect results
Previous Message Juan Miguel Paredes 2005-04-27 14:50:23 Re: BUG #1630: Wrong conversion in to_date() function. See example.