pg_dump, problems with restore

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?
alpha-lemmingAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Hatrix76Connect With a Mentor Commented:
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
 
alpha-lemmingAuthor Commented:
That was it, exactly!
0
All Courses

From novice to tech pro — start learning today.