"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