Moving a database with pg_dump and psql -U postgres db_name < … results in “ERROR: relation ”table_name“ does not exist”

前端 未结 3 1643
终归单人心
终归单人心 2021-01-30 11:18

I moved my PostgresQL database from one hard drive to another using

pg_dump -U postgres db_name > db_name.dump

and then

psq         


        
3条回答
  •  悲&欢浪女
    2021-01-30 11:57

    I was able to solve it by changing the database privileges to public CONNECT and the schema privileges for public and postgres = USAGE and CREATE.

    My backup scripts apparently didn't preserve the privileges, at least not when moving from 8.3 to 8.4.

提交回复
热议问题