Re: A creepy story about dates. How to prevent it?
scott.marlowe <scott.marlowe@ihs.com>
From: "scott.marlowe" <scott.marlowe@ihs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: <cmarin@dims.com>, "Pgsql-General-post (E-mail)" <pgsql-general@postgresql.org>
Date: 2003-06-18T17:32:04Z
Lists: pgsql-general
On Wed, 18 Jun 2003, Tom Lane wrote: > "scott.marlowe" <scott.marlowe@ihs.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?