1. 通过我的电脑-》属性-》高级-》环境变量将postgre加入到系统变量中,否则你就通过cmd进入到postgre所在bin目录下,再进行下一步操作
  2. pg_dump -U postgres starxxxx > starxxxx.sql命令,把数据库导出到一个sql文件中
  3. psql -U postgres starxxxx < starxxxx.sql命令,把sql文件导入到数据库中