Solved

pg_dump, problems with restore

Posted on 2010-11-17
2
711 Views
Last Modified: 2012-05-10
Hi Experts,

I just dumped a postgres db with:
pg_dump mydb > mydb.dmp

Open in new window


then dropped it and recreated it:
postgres=#drop database mydb;
postgres=#create database mydb;
postgres=#grant all privileges on database mydb to myuser;

Open in new window


and tried to restore it with:
psql mydb < mydb.dmp

Open in new window


... and got lots of errors looking like this:
ERROR:  value too long for type character varying(80)

Open in new window


How can that happen?
0
Comment
Question by:alpha-lemming
2 Comments
 
LVL 7

Accepted Solution

by:
Hatrix76 earned 500 total points
ID: 34154731
did you create the database with another encoding? like you created it now with ASCII and the dump was in UTF-8? that could be a problem (multibyte versus string).

it would be good if you can provide more information on the current created database and if possible the data which fails to be inserted.

0
 

Author Closing Comment

by:alpha-lemming
ID: 34204601
That was it, exactly!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question