[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [HACKERS] Date input changed in 7.4 ?
From:       Scott Lamb <slamb () slamb ! org>
Date:       2003-08-30 21:34:53
[Download RAW message or body]

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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic