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

From Ariel Carna
Subject Re: BUG #1630: Wrong conversion in to_date() function. See example.
Date
Msg-id 20050427150126.B2BAE18F42@fox.tarifar.com
Whole thread Raw
In response to Re: BUG #1630: Wrong conversion in to_date() function. See example.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
With Oracle (at least since 6.x version) this conversion is wrong.


Atentamente ,=20

Ariel Carn=E1




-----Mensaje original-----
De: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20
Enviado el: Mi=E9rcoles, 27 de Abril de 2005 11:54 a.m.
Para: Michael Fuhr
CC: Ariel E. Carn=C3=A1/Elizabeth Sosa; pgsql-bugs@postgresql.org
Asunto: Re: [BUGS] BUG #1630: Wrong conversion in to_date() function. See
example.=20

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=3D# 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: Sokolov Yura
Date:
Subject: BUG 1614 and BUG 1616 : Inadequate GIST Behaviour
Next
From: "Don Courtney"
Date:
Subject: BUG #1634: Configure step for build does not define HAVE_POSIX_SIGNALS