Re: Upgrading 7.2.4 to 7.4.1

From: "Rigmor Ukuhe" <rigmor(dot)ukuhe(at)finestmedia(dot)com>
To: Jarmo Järvenpää <Jarmo(dot)Jarvenpaa(at)softers(dot)net>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Upgrading 7.2.4 to 7.4.1
Date: 2004-02-16 13:54:00
Message-ID: OEEHLFAIJHHMABJPIANIAEHLCIAA.rigmor.ukuhe@finestmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> I've got an old 7.2.4 DB which I hoped to upgrade to 7.4.1.
> The old syntax used for creating tables had lines like
> ..
> id integer DEFAULT '',
>
> which translates to this error:
>
> pg_restore: [archiver (db)] could not execute query: ERROR: invalid
> input syntax for integer: ""
>
> I found out that integer with '' as default is not acceptable after 7.3.
> Also, some complaints were given with the data, particulary numerous
> "\N" lines when restoring (this can be worked out by using -d switch
> when dumping).
>
> Also, schemas are not going to be created (some 7.3 documents
> gave this up).
>
> Thus, must I update every DB creation script by hand and try to restore
> only the data?

Not only dbase create scripts, but most likly you have to do serious app
level reviews to get things working.
As you mentioned, if you used stuff like: WHERE intField = '' (in 7.2.4 ''
was converted to 0 (zero), in 7.4.1 you get pg_atoi error) etc. you are in
trouble. There is also other things, for example in our application, we used
statements like:
now() + intValue (in 7.2.4 it added given amount of days to timestamp), in
7.4.1 it is not permitted anymore.
And in 7.2.4 statements like: somevalue/7 + 1 worked, IIRC in 7.4.1 it
complains about "no operator float + integer" or something like that.

We had to stop migration to 7.4.1 because of all this, so if anyone knows
how to do it relatively fast or/and painless, or knows where is complete
list of this kind of changes/gotchas, please let me know.

Rigmor Ukuhe

>
>
> Regards,
> Jarmo
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.564 / Virus Database: 356 - Release Date: 19.01.2004
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.564 / Virus Database: 356 - Release Date: 19.01.2004

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Hiro 2004-02-16 16:17:20 create ONE database beyond between 2 server
Previous Message Greg Mennie 2004-02-16 13:29:03 Re: hanging for 30sec when checkpointing