psql invalid command \N while restore sql

前端 未结 14 878
后悔当初
后悔当初 2020-12-04 15:54

I\'m trying to restore my dump file, but it caused an error:

psql:psit.sql:27485: invalid command \\N

Is there a solution? I searched, but

14条回答
  •  悲&欢浪女
    2020-12-04 16:39

    I had the same problem, I created a new database and got invalid command \N on restore with psql. I solved it by setting the same tablespace with the old database.

    For example, old database backup had tablespace "pg_default", I defined the same tablespace to the new database, and the above error has gone!

提交回复
热议问题