Hi i am using postgresql . i tried to import a databsee by
$ psql arbles < app.arbles.com.15.08.2014.sql;
ERROR: syntax error at or near ""
LINE 1:
^
it gives me an error ,
- I firstly created my database arbles
- then i gave one of my database user's full privilages of the database
grant all privileges on database arbles to postgrestest;
3.then i tried the first command and it failed
my app.arbles.com.15.08.2014.sql
file is in /var/lib/postgres
i also moved it to different locations , but the same error occures.
postgrestest
is also a super user
i also thired with different solutions
1. psql -h hostname -d databasename -U username -f file.sql
2. \i C:/database/db-backup.sql
non of them worked , why is this happening , please help me , thanks in advance
pg_dump
, then usepg_restore
to import the database. – Aleks G Aug 15 '14 at 8:13file app.arbles.com.15.08.2014.sql
? How abouthead -n 3 app.arbles.com.15.08.2014.sql | cat -A
? – Craig Ringer Aug 15 '14 at 8:35