Re: Strange results from to_timestamp
| От | Adrian Maier |
|---|---|
| Тема | Re: Strange results from to_timestamp |
| Дата | |
| Msg-id | cd30ef8c0604070603p4d36f778vdde1c411572a862e@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Strange results from to_timestamp (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | 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 по дате отправления: