Re: A creepy story about dates. How to prevent it? - Mailing list pgsql-general

From Dennis Björklund
Subject Re: A creepy story about dates. How to prevent it?
Date
Msg-id Pine.LNX.4.44.0306190903050.25222-100000@zigo.dhs.org
Whole thread Raw
In response to Re: A creepy story about dates. How to prevent it?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, 18 Jun 2003, Tom Lane wrote:

> > I'm pretty sure it was the other way around, make strict locale / date
> > checking the standard and a GUC to turn it off
>
> I think that on grounds of backwards compatibility alone, we should
> leave the out-of-the-box default behavior as it is.

Who can rely on pg to accept dates that are "wrong"?

If some program (or person) generates a date where the month is 22
according to the DateStyle, then pg can guess that it's a day and correct
the date. But if someone relies on this then they will most likely also
generate other dates that will be accepted and intepreted by pg in a
different way. And you got broken data in the database.

The reason it have worked before is because everyone who had it wrong
before had to fix it anyway or get broken data into the database.

--
/Dennis


pgsql-general by date:

Previous
From: weigelt@metux.de
Date:
Subject: best method for mirroring ?
Next
From: Ron Johnson
Date:
Subject: Re: A creepy story about dates. How to prevent it?