Re: Date input changed in 7.4 ? - Mailing list pgsql-hackers

From Kevin Brown
Subject Re: Date input changed in 7.4 ?
Date
Msg-id 20030827080419.GA3845@filer
Whole thread Raw
In response to Re: Date input changed in 7.4 ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Date input changed in 7.4 ?
Re: Date input changed in 7.4 ?
List pgsql-hackers
Tom Lane wrote:
> "Mendola Gaetano" <mendola@bigfoot.com> writes:
> > I noticed that some date are not anymore accepted:
> > test=# select '18/03/71'::date;
> > ERROR:  invalid input syntax for date: "18/03/71"
> > is this the indendeed behaviour ?
> 
> If it does not match your DateStyle setting, then yes.

Umm...I hope this is controllable with a GUC variable then.

There are some cases where it's extremely useful for PostgreSQL to
accept dates of any format it knows about (ambiguities should be
resolved either by looking at the current DateStyle or, failing that, by
applying the recognition in a well-defined order).  In my case I can
probably code around it but it does require some extra effort.  But I
can easily imagine situations in which that wouldn't be an option.


Whatever happened to "be liberal in what you accept and conservative in
what you send"?  :-)





-- 
Kevin Brown                          kevin@sysexperts.com


pgsql-hackers by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: NOTICE vs WARNING
Next
From: "Marc G. Fournier"
Date:
Subject: Beta2 Tag'd and Bundled ...