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
Same thing was happened to me today. I handled issue by dumping with --inserts command.
What I do is:
1) pg_dump with inserts:
pg_dump dbname --username=usernamehere --password --no-owner --no-privileges --data-only --inserts -t 'schema."Table"' > filename.sql
2) psql (restore your dumped file)
psql "dbname=dbnamehere options=--search_path=schemaname" --host hostnamehere --username=usernamehere -f filename.sql >& outputfile.txt
Note-1 ) Make sure that adding outputfile will increase speed of import.
Note-2 ) Do not forget to create table with exact same name and columns before importing with psql.