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

From Scott Lamb
Subject Re: Date input changed in 7.4 ?
Date
Msg-id CADF1D54-DB31-11D7-88AC-000A95891440@slamb.org
Whole thread Raw
In response to Re: Date input changed in 7.4 ?  (Dennis Björklund <db@zigo.dhs.org>)
List pgsql-hackers
On Thursday, Aug 28, 2003, at 00:07 America/Chicago, Dennis Björklund
wrote:

> On Wed, 27 Aug 2003, Kevin Brown wrote:
>
>> 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
>
> And the argument bhen this was that it only leads to wrong data. As I
> see
> it, the only time you have dates in different styles is when you get it
> from a human entering dates. Then he/she will enter 01/30/03 and it is
> interpreted as 2003 January 30, he/she feels happy and enters another
> date
> in january, say 01/10/03 and now maybe it is interpreted as 2003
> October
> 1. Of course that error is not noticed since it worked the previous
> time..

Yes, yes, yes. I've run into exactly that problem when scripting MS
Outlook. All the dates on the twelfth of the month or earlier had the
month and day transposed. It never threw an error. I checked the stuff
with my own birthday (the 26th of April) so I didn't notice the problem
until a user pointed it out. The moral of the story is that an error is
much better than a guess. (Alternate moral: don't be like Microsoft.)

Thanks,
Scott Lamb


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SetVariable
Next
From: Tom Lane
Date:
Subject: Re: ALTER TABLE ... TO ... to change related names