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

From: kevin kempter <kevin(at)kevinkempterllc(dot)com>
To: Jan-Peter Seifert <Jan-Peter(dot)Seifert(at)gmx(dot)de>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: 'invalid command \N' during restore from pg_dump
Date: 2008-10-17 22:03:08
Message-ID: 76EDAE50-7CB2-4C83-87CB-7F1735C3A641@kevinkempterllc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On Oct 17, 2008, at 3:20 PM, Jan-Peter Seifert wrote:

> 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
>

No, I'm doing it at the command line on a Redhat box (postgres version
8.2.5)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2008-10-17 23:06:15 Re: 'invalid command \N' during restore from pg_dump
Previous Message Jan-Peter Seifert 2008-10-17 21:20:55 Re: 'invalid command \N' during restore from pg_dump