Re: [HACKERS] 8.2 features? - Mailing list pgsql-patches

From Harald Armin Massa
Subject Re: [HACKERS] 8.2 features?
Date
Msg-id 7be3f35d0608010015j750f0b5axacd9753ec79bd46e@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] 8.2 features?  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-patches
Joshua,

> So now it's MySQL users' turn to say, "Sure, but speed isn't
> everything...." :-)
"Sure, but speed isn't everything... We can accept 02/31/2006 as a valid
date. Let's see PostgreSQL do that!"

I got the joke :)

But: it is still a problem when converting. As accepting 2006-02-31 as a valid date would require brainwashing at least the entire core team, we should find a "recommended path of date migration from different universes".

My idea would be to:

a) declare date fields as text
b) load the dump of the other db
c) add another column for the date fields, type timestampe (w/wo tz)
d) try to update the column of c) with the converted field from a)
e) replace the failing ones manually

is this really best practice? especially finding the invalid ones would be challenging :(
idea: sort after the textual date fields; look at hot spots (0000-00-00, xxxx-02-31)

Are there better ideas? shall we document the best practice somewhere?

Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Let's set so double the killer delete select all.

pgsql-patches by date:

Previous
From: Gavin Sherry
Date:
Subject: WIP: bitmap indexes
Next
From: "Albe Laurenz"
Date:
Subject: Re: Forcing current WAL file to be archived