Re: Date input changed in 7.4 ?

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Date input changed in 7.4 ?
Date: 2003-08-27 08:04:19
Message-ID: 20030827080419.GA3845@filer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "Mendola Gaetano" <mendola(at)bigfoot(dot)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(at)sysexperts(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Johnson 2003-08-27 08:12:31 Re: Replication Ideas
Previous Message Marc G. Fournier 2003-08-27 05:29:57 Re: MHonArc configuration for spam protection