Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2FF8Kx16271 for ; Thu, 15 Mar 2001 10:08:22 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f2FF86t13714; Thu, 15 Mar 2001 10:08:06 -0500 (EST) To: Karel Zak cc: leif@danmos.dk, pgsql-interfaces@postgresql.org Subject: Re: to_date problem In-reply-to: <20010315112748.B28603@ara.zf.jcu.cz> References: <200103150737.f2F7bQl13172@crysberg.dk> <20010315112748.B28603@ara.zf.jcu.cz> Comments: In-reply-to Karel Zak message dated "Thu, 15 Mar 2001 11:27:48 +0100" Date: Thu, 15 Mar 2001 10:08:06 -0500 Message-ID: <13711.984668886@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/133 X-Sequence-Number: 1294 Karel Zak writes: > Hmm, now I see Oracle and it allows correct parse this dirty query... > SVRMGR> select to_date('2001-3-5 10:00', 'YYYY-FMMM-FMDD HH24:MI') from > dual; > TO_DATE(' > --------- > 05-MAR-01 > 1 row selected. Does it? Your example shows it with FM selected. What happens in Oracle without the FM? Still, Leif's example surprises me. Why does it pick up the '3' but ignore the '5'? Seems to me that the presence of whitespace should be enough to cue the thing that it's done seeing the day field, FM or no. In fact, I can't see a good reason for FM to affect the behavior of input conversion at all. regards, tom lane