Importing .sql file on windows to postgresql

前端 未结 7 1645
春和景丽
春和景丽 2020-12-25 12:23

I have a .sql file that was created by postgresql a while back. I now want to import this file onto a windows machine running postgresql.

How do I do this. The file

7条回答
  •  心在旅途
    2020-12-25 12:58

    command prompt

    open your cmd window and type the following (make sure the path of postgres is correct)

    ."C:\Program Files\PostgreSQL\9.4\bin\psql.exe" -h 127.0.0.1 -p 5432 -U postgres -d dbname <./query.sql

提交回复
热议问题