Restore SQL_ASCII backup... - Mailing list pgsql-admin

From Brian Myers
Subject Restore SQL_ASCII backup...
Date
Msg-id 6B8AC68C-F3BF-4153-ABAA-C1B51FFE5413@charter.net
Whole thread Raw
Responses Re: Restore SQL_ASCII backup...  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-admin
Hi all,

I'm trying to restore an old backup (7.1.4) into a new PG database (8.4). There are errors with some of the RI and
sequences,but those are easy to fix. 

The problem is that one table in the DB has TEXT fields in it and these seem to be sensitive to the DB encoding. The
defaultin the days of 7.1.4 was SQL_ASCII. The new default is UTF-8. pg_restore won't load the old table data into the
newtable. 

I tried creating a new DB with encoding SQL_ASCII and restoring the backup into that, but I get the error:

pg_restore: [archiver (db)] COPY failed: ERROR:  literal carriage return found in data
HINT:  Use "\r" to represent carriage return.
CONTEXT:  COPY encounters, line 9711: ""
WARNING: errors ignored on restore: 1
tarka@jetty:~$ psql -d triagedb
psql (8.4.1)
Type "help" for help.

The other problem is that the backups are in compressed format because I needed to save space on that system, so I
can'tjust edit the text of the data directly. 

What should I do at this point? Try to create an install of an old version of PG and restore into that?

Thanx in advance,

Brian


pgsql-admin by date:

Previous
From: Ian Lea
Date:
Subject: Re: pg_restore does not restore all tables
Next
From: Helio Campos Mello de Andrade
Date:
Subject: Postgres Dump out of order