Re: Strange behaviour of to_date()
От | Mario Weilguni |
---|---|
Тема | Re: Strange behaviour of to_date() |
Дата | |
Msg-id | 01041818125000.00700@wotan обсуждение исходный текст |
Ответ на | Re: Strange behaviour of to_date() (Karel Zak <zakkr@zf.jcu.cz>) |
Список | pgsql-hackers |
Am Mittwoch, 18. April 2001 10:47 schrieben Sie: (...) > > Yes, Oracle support using not exact format mask, but Oracle's to_date > is very based on date/time and not support others things: > > SVRMGR> select to_date('333.222.4.1.2001', '333.222.FMdd.FMmm.yyyy') from > dual; > TO_DATE(' > --------- > ORA-01821: date format not recognized > > > test=# select to_date('333.222.4.1.2001', '333.222.FMdd.FMmm.yyyy'); > to_date > ------------ > 2001-01-04 > (1 row) > > or nice: > > test=# select to_date('33304333.1.2001', '333dd333.FMmm.yyyy'); > to_date > ------------ > 2001-01-04 > (1 row) Maybe it's not designed for my needs, but that does not change the fact that it's a bug. When the mask is not exact, it should raise an error, and not silently return WRONG values, which is really bad behaviour, and will result in "lost" data. -- ===================================================Mario Weilguni KPNQwest Austria GmbH Senior Engineer Web Solutions Nikolaiplatz 4 tel: +43-316-813824 8020 graz, austria fax: +43-316-813824-26 http://www.kpnqwest.at e-mail: mario.weilguni@kpnqwest.com ===================================================
В списке pgsql-hackers по дате отправления: