Solved

pg_dump, problems with restore

Posted on 2010-11-17
2
704 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
Comment Utility
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
Comment Utility
That was it, exactly!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now