Re: Junk date getting uploaded into date field

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Junk date getting uploaded into date field
Date: 2013-11-05 09:13:14
Message-ID: 5278B6AA.1020008@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2013-11-05 09:29:42 Keepalive doubt.
Previous Message bsreejithin 2013-11-05 09:04:00 Junk date getting uploaded into date field