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

From Reid Thompson
Subject Re: Junk date getting uploaded into date field
Date
Msg-id 1383661357.8970.25.camel@raker2.ateb.com
Whole thread Raw
In response to Re: Junk date getting uploaded into date field  (bsreejithin <bsreejithin@gmail.com>)
List pgsql-general
On Tue, 2013-11-05 at 04:14 -0800, bsreejithin wrote:

> Not able to post the attached details as a comment in the reply box, so
> attaching it as an image file : 
> <http://postgresql.1045698.n5.nabble.com/file/n5776987/Untitled.png> 
> 
> 
> 
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Junk-date-getting-uploaded-into-date-field-tp5776969p5776987.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
> 
> 

to achieve what you want.... bdate needs to be defined as a date, not a
string.

test=# create table temptabl(bdate date);
CREATE TABLE
Time: 239.358 ms
test=# insert into temptabl values('33-OCT-2013');
ERROR:  date/time field value out of range: "33-OCT-2013"
LINE 1: insert into temptabl values('33-OCT-2013');                                   ^
HINT:  Perhaps you need a different "datestyle" setting.
Time: 0.288 ms
test=# 


pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: Junk date getting uploaded into date field
Next
From: Jing Fan
Date:
Subject: Re: WITH RECURSIVE doesn't work properly for me