var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Import practice database into postgresql. Syntax prob?
Im pretty new to the postgresql world.
I've got a vm (ubuntu) and have postgresql / pgAdmin3.
Ive downloaded the northwind.postgre.sql file to my '/tmp' folder.
in the terminal, logged into postgres..
"postgres=# \i /tmp/northwind.postgre.sql" keeps giving me a No such file or directory.
I know it is there, but this is an example of my current level of ignorance.
Any advice on syntax?
I don't know this "northwind" thing. But usually the DBMS is called Postgres, not "postgre".
So maybe the file is actually named "northwind.postgres.sql"?
There is many way to import postgresql database, but first you must login to psql and use specific database
that you want to restore .
psql -U userid -d nameofdatabase
or you can direct insert in terminal ;
nameofdatabase=# \i "path_of_sql_file\nameofsql.sql"
sorry for my bad english , i hope u understand
psql -U userid -d nameofdatabase -1 -f nameofsql.sql
Tags for this Thread