Re: A creepy story about dates. How to prevent it? - Mailing list pgsql-general

From Tom Lane
Subject Re: A creepy story about dates. How to prevent it?
Date
Msg-id 2134.1056390293@sss.pgh.pa.us
Whole thread Raw
In response to Re: A creepy story about dates. How to prevent it?  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: A creepy story about dates. How to prevent it?  (Dennis Gearon <gearond@cvc.net>)
Re: A creepy story about dates. How to prevent it?  (Peter Eisentraut <peter_e@gmx.net>)
Re: A creepy story about dates. How to prevent it?  ("scott.marlowe" <scott.marlowe@ihs.com>)
List 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

pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: [pgsql-advocacy] interesting PHP/MySQL thread
Next
From: "Robert J. Sanford, Jr."
Date:
Subject: SELECT @@IDENTITY