PostgreSQL 9.1 pg_restore error regarding PLPGSQL

前端 未结 6 1491
-上瘾入骨i
-上瘾入骨i 2020-12-23 02:30

I am using Postgres for a django project and I am currently implementing a database backup/restore system that as simple as possible performs a pg_dump when the user clicks

6条回答
  •  Happy的楠姐
    2020-12-23 02:35

    It seems like pg_restore tries to restore some extra data which you don't own. Try to add -n public option to your pg_restore command line. It will tell pg_restore restore only contents of public schema. Your command line should looks like

    pg_restore -U username -c -n public -d database_name
    

提交回复
热议问题