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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, Jean-Luc Lachance <jllachan(at)nsd(dot)ca>, Frank Miles <fpm(at)u(dot)washington(dot)edu>, Bruno Wolff III <bruno(at)wolff(dot)to>, Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: A creepy story about dates. How to prevent it?
Date: 2003-06-23 19:22:20
Message-ID: 200306231922.h5NJMK028715@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Eisentraut wrote:
> Tom Lane writes:
>
> > Other than me, I think you mean. dd/mm/yyyy and mm/dd/yyyy are
> > inherently ambiguous in the real world, and when you can clearly
> > determine what the intended meaning is, I think it's more reasonable
> > to assume the datestyle isn't set correctly than to reject the data.
>
> That might even make the slightest sense if the supposedly wrong datestyle
> would then stay switched. But the automatic switching only happens for a
> certain subsets of inputs and only in that instance. So if a user did
> really mean the opposite setting he will not be happy, and if the user did
> not mean the opposite setting he will not be happy either. So no one is
> happy.

I think we have had enough discussion to remove the question mark from
this TODO item:

* Allow current datestyle to restrict dates; prevent month/day swapping
from making invalid dates valid

Of course, if later discussion changes, I will re-add it.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-06-23 19:24:11 Re: A creepy story about dates. How to prevent it?
Previous Message Peter Eisentraut 2003-06-23 19:16:48 Re: A creepy story about dates. How to prevent it?