Re: Junk date getting uploaded into date field - Mailing list pgsql-general

From John R Pierce
Subject Re: Junk date getting uploaded into date field
Date
Msg-id 527A04F8.6030409@hogranch.com
Whole thread Raw
In response to Re: Junk date getting uploaded into date field  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
On 11/5/2013 10:29 AM, Steve Crawford wrote:
> The to_date and to_timestamp functions do minimal input error-checking
> and are intended for conversion of non-standard formats that cannot be
> handled by casting. These functions will attempt to convert illegal
> dates to the best of their ability, e.g. to_date('33-OCT-2013',
> 'dd-mon-yyyy') will return 2013-11-02. Users of these functions are
> advised to perform whatever external error-checking they deem prudent.


I think this should also point out that this behavior is different than
cast, which is much stricter.

the fact that these two methods are polar opposites in this behavior is
troublesome.


--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



pgsql-general by date:

Previous
From: Massimo Ortensi
Date:
Subject: Where can I find the 9.3 beta1 rpm now ?
Next
From: Greg Burek
Date:
Subject: Is it advisable to pg_upgrade directly from 9.0 to 9.3?