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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "scott.marlowe" <scott.marlowe@ihs.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Peter Eisentraut <peter_e@gmx.net>, Jean-Luc Lachance <jllachan@nsd.ca>, Frank Miles <fpm@u.washington.edu>, Bruno Wolff III <bruno@wolff.to>, Ron Johnson <ron.l.johnson@cox.net>, pgsql-general@postgresql.org
Date: 2003-06-23T17:44:53Z
Lists: pgsql-general
"scott.marlowe" <scott.marlowe@ihs.com> writes:
> The one thing that should absolutely be turned off is day/month swapping 
> on dates of the form: 2003-02-22.

Agreed on that.  YYYY-DD-MM isn't used in the real world AFAIK, and it's
reasonable to treat it as an error.

> I've seen little actual defense of the current behaviour,

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.

			regards, tom lane