A lot of "invalid command \N" when I try to restore PostgreSQL dump -


i made backup of database on mac , tried restore on computer ubuntu. when execute

psql -u uname -d dbname -f ~/dump_from_mac 

i have lot of error messages "invalid command \n" , "relation 'sometable' not exist". question similar can't copy table database pg_dump don't know how fix dump file. wipe mac , can't make new dump.

my problem solved setting postgresql-contrib package

sudo apt-get install postgresql-contrib 

and creating extension uuid-ossp in db

create extension "uuid-ossp"; 

my db haven't extension default , psql not execute uuid_generate_v1() function dump file. in cases install postgresql-contrib enough, problem may in missed extensions too.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -