![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Case PgSQL 7.3.8/SuSE Linux 8.2 (i586) ====================================== PROD=# select to_date('2005-02-32', 'YYYY-MM-DD'); to_date ------------ 2005-03-04 (1 row) Case PgSQL 7.4.6/SuSE Linux 9.2 (i586)====================================== PROD=> select to_date('2005-02-32', 'YYYY-MM-DD'); to_date ------------ 04-03-2005 (1 row) |
#2
| |||
| |||
|
|
PROD=# select to_date('2005-02-32', 'YYYY-MM-DD'); to_date ------------ 2005-03-04 (1 row) |
#3
| |||
| |||
|
|
=20 "Ariel E. Carn=C3=A1/Elizabeth Sosa" <acarna (AT) tarifar (DOT) com> writes: PROD=3D# select to_date('2005-02-32', 'YYYY-MM-DD'); to_date ------------ 2005-03-04 (1 row) =20 I'm not convinced that's a bug --- most implementations of the Unix mktime function will handle out-of-range day numbers like that. =20 regards, tom lane =20 ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? =20 http://www.postgresql.org/docs/faq |
|
wrote:</span blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0= |
#4
| |||
| |||
|
|
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. |
#5
| |||
| |||
|
|
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? |
#6
| |||
| |||
|
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |