Re: 'invalid command \N' during restore from pg_dump - Mailing list pgsql-admin

From Jan-Peter Seifert
Subject Re: 'invalid command \N' during restore from pg_dump
Date
Msg-id 48F901B7.2050807@gmx.de
Whole thread Raw
In response to 'invalid command \N' during restore from pg_dump  (kevin kempter <kevin@kevinkempterllc.com>)
Responses Re: 'invalid command \N' during restore from pg_dump  (kevin kempter <kevin@kevinkempterllc.com>)
List pgsql-admin
Hello,

kevin kempter wrote:

> I'm trying to run a restore from a pg_dump and I get loads of these:
>
> invalid command \N
>
>
> I see lots of \N char's in the data for some of the tables (NULL's ?)

Are you using pgAdmin's SQL-editor for restoring by any chance? It
throws errors - especially if the \N (NULL) is at the beginning of the
line. Use psql for restoring or try with activating the option to use
INSERT instead of COPY commands for creating dumps with pg_dump.

Peter

pgsql-admin by date:

Previous
From: kevin kempter
Date:
Subject: 'invalid command \N' during restore from pg_dump
Next
From: kevin kempter
Date:
Subject: Re: 'invalid command \N' during restore from pg_dump