From: | Mario Weilguni <Mario(dot)Weilguni(at)kpnqwest(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org> |
Cc: | Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> |
Subject: | Re: Strange behaviour of to_date() |
Date: | 2001-04-18 16:12:50 |
Message-ID: | 01041818125000.00700@wotan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)weilguni(at)kpnqwest(dot)com
===================================================
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-04-18 16:25:22 | Re: Fix for psql core dumping on bad user |
Previous Message | Zeugswetter Andreas SB | 2001-04-18 16:09:37 | AW: AW: timeout on lock feature |