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 5278B6AA.1020008@hogranch.com
Whole thread Raw
In response to Junk date getting uploaded into date field  (bsreejithin <bsreejithin@gmail.com>)
Responses Re: Junk date getting uploaded into date field
List pgsql-general
On 11/5/2013 1:04 AM, bsreejithin wrote:
> A wrong date like ,say, 33-Oct-2013 gets converted as 2-Nov-2013 when the
> data is loaded into a date field. No error raised.Data gets uploaded!

ummmmm.   postgresql won't do that conversion

postgres=# select '33-Oct-2013'::date;
ERROR:  date/time field value out of range: "33-Oct-2013"
LINE 1: select '33-Oct-2013'::date;
                ^
.

how exactly are you inserting this CSV data into postgres ?

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



pgsql-general by date:

Previous
From: bsreejithin
Date:
Subject: Junk date getting uploaded into date field
Next
From: Francisco Olarte
Date:
Subject: Keepalive doubt.