Re: [HACKERS] 8.2 features?

Поиск
Список
Период
Сортировка
От Harald Armin Massa
Тема Re: [HACKERS] 8.2 features?
Дата
Msg-id 7be3f35d0608010015j750f0b5axacd9753ec79bd46e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] 8.2 features?  ("Joshua D. Drake" <jd@commandprompt.com>)
Список 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 по дате отправления:

Предыдущее
От: Gavin Sherry
Дата:
Сообщение: WIP: bitmap indexes
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Forcing current WAL file to be archived