Re: COPY problem on -- strings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sabin Coanda" <sabin(dot)coanda(at)deuromedia(dot)ro>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY problem on -- strings
Date: 2008-11-19 18:18:33
Message-ID: 8235.1227118713@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Sabin Coanda" <sabin(dot)coanda(at)deuromedia(dot)ro> writes:
> I backup the database plain with the command:
> pg_dump.exe -U postgres -F p -v -f "backup_plain.sql" "DemoDB"

> I create a new database, and I run the script. But it rise me the error:
> ERROR: syntax error at or near "1"
> LINE 49: 1 -- any text

> I look for the error line and I saw how pg_dump created the script
> statement:
> COPY "A" ("Col1", "Col2") FROM stdin;
> 1 -- any text
> \.

Is that the *first* error message you got?

My guess is that something went wrong with the COPY command, so that
psql failed to switch into copy-data mode and is trying to interpret
the following stuff as SQL commands.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Harrison 2008-11-19 18:23:59 Re: PostgreSQL 8.4 download?
Previous Message Joshua D. Drake 2008-11-19 18:08:20 Re: PostgreSQL 8.4 download?