date function bug

From: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Cc: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
Subject: date function bug
Date: 2019-10-23 14:22:31
Message-ID: 0bac35bcde6747e485bc7468c4080798@phx-exmbprd-01.adprod.bmc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ravi Krishna 2019-10-23 14:28:15 Re: date function bug
Previous Message Laurenz Albe 2019-10-23 11:42:47 Re: jsonb_set() strictness considered harmful to data