Re: [HACKERS] 8.2 features?

From: "Harald Armin Massa" <haraldarminmassa(at)gmail(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] 8.2 features?
Date: 2006-08-01 07:15:52
Message-ID: 7be3f35d0608010015j750f0b5axacd9753ec79bd46e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers 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.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Glaesemann 2006-08-01 07:51:39 Re: [PATCHES] 8.2 features?
Previous Message Peter Eisentraut 2006-08-01 06:54:25 Re: Suggested changes to Tutorial

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Glaesemann 2006-08-01 07:51:39 Re: [PATCHES] 8.2 features?
Previous Message Tom Lane 2006-08-01 04:24:03 Re: Standby Mode

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Glaesemann 2006-08-01 07:51:39 Re: [PATCHES] 8.2 features?
Previous Message Bruce Momjian 2006-08-01 04:54:59 Re: pg_dump: multiple tables, schemas with exclusions and