-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

If this isn't the right list for this type of question, please redirect
me to the relevant list.

I get the following error trying to restore a 7.2.2-dump-file in 7.4b4:

psql:nbeweb-db-as_copy-7.2.2.dmp:2051589: invalid command \nHelena
psql:nbeweb-db-as_copy-7.2.2.dmp:2051589: invalid command \N
psql:nbeweb-db-as_copy-7.2.2.dmp:2051589: invalid command \N

The dump is created with "pg_dump -O nbeweb > nbeweb-db-as_copy-7.2.2.dmp"

This error does not occur if I dump it with "pg_dump -O -D". But
restoring a dump with -D takes 6 hours(dumpfile is 1.2 GB).

The line in question(2051589) is here(starting with "8\t"):
COPY "logg" FROM stdin;
8	Oslo	Hamburg                       	21. oktober 2002	Bjï¿½rn E. Moe
Hansteens gate 9, 0253 Oslo	22 31 31 62	22 55 34 23	900 90 729	22 42
50 33	bjorn@nor-way.no	Bjï¿½rn E. M., kjï¿½nn Mann, Nasjonalitet NO\nHelena
E., kjï¿½nn Kvinne, Nasjonalitet SE\n	Hotel Alte Wache	4
14.okt.2002	\N	3740	\N	1
.
.
.


I get several errors above the mentioned error:
psql:nbeweb-db-as_copy-7.2.2.dmp:2050610: ERROR:  relation
"on_article_searchable" does not exist
psql:nbeweb-db-as_copy-7.2.2.dmp:2050614: invalid command \
psql:nbeweb-db-as_copy-7.2.2.dmp:2050647: ERROR:  syntax error at or
near "1358" at character 1
psql:nbeweb-db-as_copy-7.2.2.dmp:2050614: invalid command \
psql:nbeweb-db-as_copy-7.2.2.dmp:2050647: ERROR:  syntax error at or
near "1358" at character 1
psql:nbeweb-db-as_copy-7.2.2.dmp:2050731: ERROR:  syntax error at or
near ""nei"" at character 1
psql:nbeweb-db-as_copy-7.2.2.dmp:2050732: ERROR:  syntax error at or
near "' '" at character 1
psql:nbeweb-db-as_copy-7.2.2.dmp:2051237: invalid command \N
psql:nbeweb-db-as_copy-7.2.2.dmp:2051580: invalid command \.

The table on_article_searchable doesn't exist 'cause I havn't installed
tsearch yet(on purpose).

Is it possible that pg_dump gets confused by previous errors?
AFAIK, the \. command is to end a COPY "table" from stdin; command.

I cannot risk to get partially copied tables, so the only solution seems
to be to restore with a dump created with the -D option.

AFAIK, \n are newlines and \N ar NULLs right? Why isnt psql able to
parse it as such when restoring with COPY? It seems to think those are
commands (backslash-commands), and not data.

Anyone care to shed some light on this?

- --
Andreas Joseph Krogh <andreak@officenet.no>
Managing Director, Senior Software Developer
OfficeNet AS

- - Writing software is more fun than working.

gpg public_key: http://dev.officenet.no/~andreak/public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/hU3AUopImDh2gfQRAtEoAJ9FtjI/cs+ssZhGNQcV/TG0oSuRFACfYKWc
fjnJEcxHpbUhv7d6IWxDcjU=
=8RZH
-----END PGP SIGNATURE-----


Thu, 09 Oct 2003 14:00:01 +0200
Andreas Joseph Krogh <andreak@officenet.no>
pg_dump error (loading 7.2.2-dump in 7.4b4)