Re: to_date problem - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: to_date problem
Date
Msg-id 13711.984668886@sss.pgh.pa.us
Whole thread Raw
In response to Re: to_date problem  (Karel Zak <zakkr@zf.jcu.cz>)
Responses Re: to_date problem  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-interfaces
Karel Zak <zakkr@zf.jcu.cz> 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


pgsql-interfaces by date:

Previous
From: "J. T. Vermeulen"
Date:
Subject: Re: Big trouble with libpq++
Next
From: Karel Zak
Date:
Subject: Re: to_date problem