pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Karel Zak <zakkr@zf.jcu.cz>
Cc: leif@danmos.dk
Cc: pgsql-interfaces@postgresql.org
Subject: Re: to_date problem
Date: Thu, 15 Mar 2001 10:08:06 -0500
Message-ID: <13711.984668886@sss.pgh.pa.us> (raw)
In-Reply-To: <20010315112748.B28603@ara.zf.jcu.cz>
References: <200103150737.f2F7bQl13172@crysberg.dk>
	<20010315112748.B28603@ara.zf.jcu.cz>

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



view thread (4+ messages)  latest in thread

Message-ID: <13711.984668886@sss.pgh.pa.us>
Permalink:  ../13711.984668886@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13711.984668886@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, zakkr@zf.jcu.cz, leif@danmos.dk
  Subject: Re: to_date problem
  In-Reply-To: <13711.984668886@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox