Re: Date input changed in 7.4 ?

From: Scott Lamb <slamb(at)slamb(dot)org>
To: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org, Kevin Brown <kevin(at)sysexperts(dot)com>
Subject: Re: Date input changed in 7.4 ?
Date: 2003-08-30 21:34:53
Message-ID: CADF1D54-DB31-11D7-88AC-000A95891440@slamb.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-08-30 21:45:29 Re: ALTER TABLE ... TO ... to change related names
Previous Message Tom Lane 2003-08-30 21:30:30 Re: SetVariable