From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | "Abraham, Danny" <danny_abraham(at)bmc(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: date function bug |
Date: | 2019-10-23 14:46:03 |
Message-ID: | 4d5e514f-4db9-0647-f6ba-6da0648a207b@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 10/23/19 7:22 AM, Abraham, Danny wrote:
> Hi,
>
> The function "to_date" does not fail illegal values.
> Is this a known bug?
> What is the recommended type checking?
>
>
> ctrlmdb=> select to_date('2018100X','YYYYMMDD');
> to_date
> ------------
> 2018-10-01
> (1 row)
>
>
At:
https://www.postgresql.org/docs/11/functions-formatting.html
I would read the section starting :
"Usage notes for date/time formatting: ..."
several times. There a lot of 'if and or buts' in there.
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Ravi Krishna | 2019-10-23 14:55:34 | Re: date function bug |
Previous Message | Tom Lane | 2019-10-23 14:44:52 | Re: date function bug |