Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc.. - Mailing list pgsql-hackers

From Rushabh Lathia
Subject Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc..
Date
Msg-id 460abcb10906100118k6b3bdbb0o4cbc2ab5ea34d515@mail.gmail.com
Whole thread Raw
Responses Re: Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' etc..  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Getting error while trying to insert date with the format 'dd-month-yyyy' , 'day-mm-yyyy' (format which add the space
inbetween the date ) etc.. <br /><br />Testcase:<br />========<br />postgres=# \d t<br />     Table "public.t"<br />
 Column| Type | Modifiers <br />--------+------+-----------<br /> a      | date | <br /><br />postgres=# insert into t
values( to_char(current_date+2, 'day-mm-yyyy')::date); <br />ERROR:  invalid input syntax for type date: "friday  
-06-2009"<br/><br />postgres=# insert into t values ( to_char(current_date+2, 'dd-month-yyyy')::date);<br />ERROR: 
invalidinput syntax for type date: "12-june     -2009"<br /><br clear="all" /><br />Debugged the issue and found that
errorcoming from date_in() -> DecodeDateTime(). Problem here is whenever any space comes in the date ParseDateTime()
unableto break string into tokens based on a date/time context.<br /><br /><br />-- <br />Rushabh Lathia<br /><a
href="http://www.EnterpriseDB.com">www.EnterpriseDB.com</a><br/> 

pgsql-hackers by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: Problem with listen_addresses = '*' on 8.4beta2 on AIX
Next
From: Andres Freund
Date:
Subject: Re: Plan time Improvement - 64bit bitmapset