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

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <cmarin(at)dims(dot)com>, "Pgsql-General-post (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: A creepy story about dates. How to prevent it?
Date: 2003-06-18 17:32:04
Message-ID: Pine.LNX.4.33.0306181125410.5104-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 18 Jun 2003, Tom Lane wrote:

> "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> > That reminds me, did we get the date parsing fixed so that you can't
> > insert 22/03/2003 into a european database (or conversely, 03/22/2003 into
> > a US database) ? I.e the problem where the date parser assumed you meant
> > it the other way...
>
> IIRC, there was no consensus that that's a bug.

I thought there was, and someone had said they were gonna fix it.

IMHO it is a bug. We don't let postgresql "guess" about a lot of more
obvious things (i.e. int4 to int8 casting, etc...) and letting it guess
about dates makes it non-ACID compliant.

If it isn't a bug, how do I implement a check constraint to stop it from
happening? I'd like to know my database accepts properly formatted input
and rejects the rest. That's what the C in ACID means, right?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message matt 2003-06-18 17:36:44 Re: PostgreSQL calibration
Previous Message Ernest E Vogelsinger 2003-06-18 17:29:05 Re: Linux supports hot-swappable hardware? [was Re: