Re: Data migration problems with Upgrade from Version 6.5.2 to 7.1.2

From: Doug McNaught <doug(at)wireboard(dot)com>
To: "Tom(dot)Bakken" <Tom(dot)Bakken(at)tx(dot)usda(dot)gov>
Cc: Postgres general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Data migration problems with Upgrade from Version 6.5.2 to 7.1.2
Date: 2001-06-27 17:31:44
Message-ID: m34rt1j0cf.fsf@belphigor.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Tom.Bakken" <Tom(dot)Bakken(at)tx(dot)usda(dot)gov> writes:

> This is my first posting to the list, so I hope this is the right place
> for this question.
>
> I created a dump of all data on the 6.5.2 machine: pg_dumpall > db.out
> and copied it over to the new system.
>
> I then attempted to import the data: psql -d template1 -f
> /home/postgreSQL/infosystems/dump/db.out
>
> The result was a few tables came through okay but a lot of tables with
> no records. I redirected the standard error and will include a few
> snippets of the complaints the psql utility encountered:
> psql:/home/postgreSQL/infosystems/dump/db.out:499: ERROR: Attribute
> 'extra_pos'
> is of type 'bool' but default expression is of type 'int4'
> You will need to rewrite or cast the expression

> My question here is, how to resolve the BOOLEAN/INTEGER conflict. It
> doesn't appear to be a problem with the earlier version of postgres. I
> believe that's what causes most of the error messages that follow:
>
> How should I specify my boolean fields? I have them set up as follows:
>
> column BOOLEAN DEFAULT 0

If you change "DEFAULT 0" to "DEFAULT 'f'" it should work
OK--certainly works in my 7.1.2 installation. You can whip up a quick
Perl or sed script to do the job.

Good luck; I hope this is the only problem you hit in your
migration...

-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time... --Dylan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-06-27 17:41:17 Re: SHMMAX value
Previous Message Lamar Owen 2001-06-27 17:26:05 Re: SHMMAX value