| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера