Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CC789650140 for ; Fri, 17 Oct 2008 18:21:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77034-07 for ; Fri, 17 Oct 2008 18:21:07 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id B3D4764FC5F for ; Fri, 17 Oct 2008 18:21:06 -0300 (ADT) Received: (qmail invoked by alias); 17 Oct 2008 21:21:03 -0000 Received: from dslc-082-082-169-007.pools.arcor-ip.net (EHLO [192.168.123.101]) [82.82.169.7] by mail.gmx.net (mp035) with SMTP; 17 Oct 2008 23:21:03 +0200 X-Authenticated: #955937 X-Provags-ID: V01U2FsdGVkX1+doocU6qeddjtS6lYOz0d829sVRAbY7MwrbaHZ89 y3Izn/DjIf26nE Message-ID: <48F901B7.2050807@gmx.de> Date: Fri, 17 Oct 2008 23:20:55 +0200 From: Jan-Peter Seifert User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: kevin kempter CC: pgsql-admin@postgresql.org Subject: Re: 'invalid command \N' during restore from pg_dump References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.66 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/126 X-Sequence-Number: 30582 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