Re: A creepy story about dates. How to prevent it?

From: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, <cmarin(at)dims(dot)com>, "Pgsql-General-post (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: A creepy story about dates. How to prevent it?
Date: 2003-06-19 07:10:06
Message-ID: Pine.LNX.4.44.0306190903050.25222-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dani Oderbolz 2003-06-19 07:13:55 Re: PostgreSQL calibration
Previous Message weigelt 2003-06-19 06:39:17 best method for mirroring ?