pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed'invalid command \N' during restore from pg_dump
4+ messages / 3 participants
[nested] [flat]
* 'invalid command \N' during restore from pg_dump
@ 2008-10-17 21:11 kevin kempter <kevin@kevinkempterllc.com>
2008-10-17 21:20 ` Re: 'invalid command \N' during restore from pg_dump Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
0 siblings, 1 reply; 4+ messages in thread
From: kevin kempter @ 2008-10-17 21:11 UTC (permalink / raw)
To: pgsql-admin
Hi all;
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 ?)
Thoughts?
Thanks in advance
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: 'invalid command \N' during restore from pg_dump
2008-10-17 21:11 'invalid command \N' during restore from pg_dump kevin kempter <kevin@kevinkempterllc.com>
@ 2008-10-17 21:20 ` Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
2008-10-17 22:03 ` Re: 'invalid command \N' during restore from pg_dump kevin kempter <kevin@kevinkempterllc.com>
0 siblings, 1 reply; 4+ messages in thread
From: Jan-Peter Seifert @ 2008-10-17 21:20 UTC (permalink / raw)
To: kevin kempter <kevin@kevinkempterllc.com>; +Cc: 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: 'invalid command \N' during restore from pg_dump
2008-10-17 21:11 'invalid command \N' during restore from pg_dump kevin kempter <kevin@kevinkempterllc.com>
2008-10-17 21:20 ` Re: 'invalid command \N' during restore from pg_dump Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
@ 2008-10-17 22:03 ` kevin kempter <kevin@kevinkempterllc.com>
2008-10-17 23:06 ` Re: 'invalid command \N' during restore from pg_dump Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: kevin kempter @ 2008-10-17 22:03 UTC (permalink / raw)
To: Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>; +Cc: 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)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: 'invalid command \N' during restore from pg_dump
2008-10-17 21:11 'invalid command \N' during restore from pg_dump kevin kempter <kevin@kevinkempterllc.com>
2008-10-17 21:20 ` Re: 'invalid command \N' during restore from pg_dump Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
2008-10-17 22:03 ` Re: 'invalid command \N' during restore from pg_dump kevin kempter <kevin@kevinkempterllc.com>
@ 2008-10-17 23:06 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2008-10-17 23:06 UTC (permalink / raw)
To: kevin kempter <kevin@kevinkempterllc.com>; +Cc: Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>; pgsql-admin
kevin kempter <kevin@kevinkempterllc.com> writes:
> I'm trying to run a restore from a pg_dump and I get loads of these:
> invalid command \N
It sounds like you had an error in a COPY command, which caused psql
not to go into copy-data-eating mode but instead keep trying to read
the data as SQL commands.
Generally speaking, looking at the *first* error is the most informative
way to proceed --- all the rest may just be cascading failures.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2008-10-17 23:06 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-10-17 21:11 'invalid command \N' during restore from pg_dump kevin kempter <kevin@kevinkempterllc.com>
2008-10-17 21:20 ` Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
2008-10-17 22:03 ` kevin kempter <kevin@kevinkempterllc.com>
2008-10-17 23:06 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox