0

I'm trying to import a database to use on PostGis. The file has more than 1GB and the main restore file has a lot of structures like this:

\i $$PATH$$/16600.dat

Where $$PATH$$ is the path on the operational system. Then when i try to put the right path

\i F:\Faculdade\Banco de Dados II\bc250_pgis20_dump\16600.dat

i got the following errors:

ERROR:  syntax error at or near "\"
LINE 1632: \i 'F:\Faculdade\Banco de Dados II\bc250_pgis20_dump\16599.d...
           ^
********** Error **********

ERROR: syntax error at or near "\"
SQL state: 42601
Character: 52941

Please, help me. My head is hurting cause i'm trying to fix this all night long. PS: I'm using PgAdmin3 and Windows.

  • Have you read [this](http://stackoverflow.com/questions/19858176/how-to-escape-spaces-in-path-during-scp-copy-in-linux) ? – Tim Biegeleisen Oct 27 '15 at 00:52
  • What is on the previous line? ( hint: try to put `\echo OMG` on the previous line to see if the psql/pgadmin parser is out of sync) But: the previous suggestion looks even simpler (I don't know windows, I think is is terrible) – wildplasser Oct 27 '15 at 00:53
  • Guys, i restored the database using the backup/restore tool. But i'm gonna take a look at that link. Thanks for the help :) – Gabriel Gomes Oct 27 '15 at 01:21

0 Answers0