Skip site navigation (1) Skip section navigation (2)

Re: 'invalid command \N' during restore from pg_dump

From: Jan-Peter Seifert <Jan-Peter(dot)Seifert(at)gmx(dot)de>
To: kevin kempter <kevin(at)kevinkempterllc(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: 'invalid command \N' during restore from pg_dump
Date: 2008-10-17 21:20:55
Message-ID: 48F901B7.2050807@gmx.de (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-admin by date

Next:From: kevin kempterDate: 2008-10-17 22:03:08
Subject: Re: 'invalid command \N' during restore from pg_dump
Previous:From: kevin kempterDate: 2008-10-17 21:11:24
Subject: 'invalid command \N' during restore from pg_dump

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group