to_char incompatibility

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема to_char incompatibility
Дата
Msg-id 200801101341.18862.peter_e@gmx.net
обсуждение исходный текст
Список pgsql-hackers
On Oracle:

SQL> select to_date('31-DEC-200700:00:00', 'dd-mon-yyyy hh24:mi:ss') from 
dual;

TO_DATE('
---------
31-DEC-07

On PostgreSQL:

select to_date('31-DEC-200700:00:00', 'dd-mon-yyyy hh24:mi:ss');  to_date
--------------200700-12-31

Now the input value is probably a mistake.  But according to the theory 
described in the PostgreSQL documentation that to_char more or less ignores 
whitespace unless FX is used, I think the Oracle behavior is more correct. In 
addition, even if it wants to take 6 digits for the year in spite of only 4 
Y's, the rest of the format wouldn't match anymore.

Is anyone an Oracle format code expert who can comment on this?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Markus Schiltknecht
Дата:
Сообщение: Re: Some ideas about Vacuum
Следующее
От: "Roberts, Jon"
Дата:
Сообщение: Re: to_char incompatibility