Re: Strange results from to_timestamp - Mailing list pgsql-hackers

From Adrian Maier
Subject Re: Strange results from to_timestamp
Date
Msg-id cd30ef8c0604070603p4d36f778vdde1c411572a862e@mail.gmail.com
Whole thread Raw
In response to Re: Strange results from to_timestamp  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 4/7/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Mario Weilguni <mweilguni@sime.com> writes:
> > I think all except the first one should raise a warning, isn't it?
>
> to_timestamp (and friends) all seem to me to act pretty bizarre when
> faced with input that doesn't match the given format string.  However,
> in the end that is an Oracle-compatibility function, and there is only
> one measure of what it should do: what does Oracle do in the same case.
> Can anyone try these examples on a recent Oracle version?


In Oracle10g Express those dates are rejected as invalid :

SQL> select to_timestamp('00000000 0300','yyyymmdd hh24mi') from dual;
select to_timestamp('00000000 0300','yyyymmdd hh24mi') from dual                   *
ERROR at line 1:
ORA-01843: not a valid month


SQL> select to_timestamp('         0300','yyyymmdd hh24mi') from dual;
select to_timestamp('         0300','yyyymmdd hh24mi') from dual                   *
ERROR at line 1:
ORA-01843: not a valid month



Cheers,
Adrian Maier


pgsql-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Windows installer bugs (was: [BUGS] BUG #2374: Installation Error)
Next
From: Teodor Sigaev
Date:
Subject: GIN - Generalized Inverted iNdex.