Thread: Syntax error when restoring database from dump

Syntax error when restoring database from dump

From
Clodoaldo
Date:
I dumped the db with:
pg_dump -C -f dbname.dump

$ uname -a
Linux myhost.mydomain.net 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 14:10:25
EST 2007 x86_64 x86_64 x86_64 GNU/Linux

Postgresql 8.2.7

And restored in another machine:
$ uname -a
Linux dkt 2.6.24.4-64.fc8 #1 SMP Sat Mar 29 09:54:46 EDT 2008 i686
athlon i386 GNU/Linux

psql -e -a -f dbname.dump

Then this error message:
--
-- PostgreSQL database dump complete
--
psql:dbname.dump:58464: ERROR:  syntax error at or near "rustyzs"
LINE 1: rustyzs Rafael Rodrigues 25260 rafaelcosta_arq@example.com 2...

This is where the error is:

zezetecoteco    Jose Eduardo de Arruda  3972    je.arruda@example.com
  21622370678     51      200.147.105.26  2007-05-13 18:21:32.52224
2+00   ;\\007\\337\\302\\330\\343Q\\000\\221\\343\\030n\\344\\312\\016\\205\\025y\\214\\377
   2990    t       f       0
rustyzs Rafael Rodrigues        25260   rafaelcosta_arq@example.com
 22819672809     622     201.1.6.164     2007-06-25 17:43:19.066936+00
  5\\032\\306\\313\\374\\2664\\004\\222c\\377.W\\216Y\\245\\337\\006+\\222
       9668    t       f       0
domingues       joão batista domingues  17503
domingues_domingues@example.com        00861372808     709
201.13.142.146  2007-07-01 18:09:17.644706+00
,,\\252yS\\337\\211\\273\\034TJV9/\\303\\330[/o\\251    9094    t
 f       0

I can't see what the error is. The source database is working
correctly and selecting the offending row raises no problem. I tried
dumping and downloading again but same error.

Regards, Clodoaldo

Re: Syntax error when restoring database from dump

From
Clodoaldo
Date:
My mistake. Sorry for the noise.

Regards, Clodoaldo

2008/4/12, Clodoaldo <clodoaldo.pinto.neto@gmail.com>:
> I dumped the db with:
>  pg_dump -C -f dbname.dump
>
>  $ uname -a
>  Linux myhost.mydomain.net 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 14:10:25
>  EST 2007 x86_64 x86_64 x86_64 GNU/Linux
>
>  Postgresql 8.2.7
>
>  And restored in another machine:
>  $ uname -a
>  Linux dkt 2.6.24.4-64.fc8 #1 SMP Sat Mar 29 09:54:46 EDT 2008 i686
>  athlon i386 GNU/Linux
>
>  psql -e -a -f dbname.dump
>
>  Then this error message:
>  --
>  -- PostgreSQL database dump complete
>  --
>  psql:dbname.dump:58464: ERROR:  syntax error at or near "rustyzs"
>  LINE 1: rustyzs Rafael Rodrigues 25260 rafaelcosta_arq@example.com 2...
>
>  This is where the error is:
>
>  zezetecoteco    Jose Eduardo de Arruda  3972    je.arruda@example.com
>   21622370678     51      200.147.105.26  2007-05-13 18:21:32.52224
>  2+00   ;\\007\\337\\302\\330\\343Q\\000\\221\\343\\030n\\344\\312\\016\\205\\025y\\214\\377
>    2990    t       f       0
>  rustyzs Rafael Rodrigues        25260   rafaelcosta_arq@example.com
>   22819672809     622     201.1.6.164     2007-06-25 17:43:19.066936+00
>   5\\032\\306\\313\\374\\2664\\004\\222c\\377.W\\216Y\\245\\337\\006+\\222
>        9668    t       f       0
>  domingues       joão batista domingues  17503
>  domingues_domingues@example.com        00861372808     709
>  201.13.142.146  2007-07-01 18:09:17.644706+00
>  ,,\\252yS\\337\\211\\273\\034TJV9/\\303\\330[/o\\251    9094    t
>   f       0
>
>  I can't see what the error is. The source database is working
>  correctly and selecting the offending row raises no problem. I tried
>  dumping and downloading again but same error.
>
>  Regards, Clodoaldo
>