I have backup created like this:
pg_dump dbname > file
I am trying to restore the database (after drop database and create database) like this:
psql dbname < file
What I get is a database full of tables that are created with dbname.tablename
instead of just tablename
.
How do I restore a postgres database making sure the tables it creates has just tablename
and not dbname.tablename
?