能用批命令 来操作pgsql执行sql或UTF8格式的sql文件?

解决方案 »

  1.   

    psql -d newdatabase -U postgres -f dump.sql
      

  2.   

    I have a try but i Failed
    psql -d Css330-43 -U postgres -f my.sqlINSERT INTO "Cus_BusinessResult"(
                "BusinessResultId", "Results")
        VALUES (123, "123");我的sql语句
      

  3.   

    你怎么运行的,要在SHELL(DOS窗口下),非POSTGRESQL中
      

  4.   

    我是在cmd命令行中  先找到gsql的安装路径 在执行psql -d Css330-43 -U postgres -f my.sql
      

  5.   

    psql: FATAL:  no pg_hba.conf entry for host "::1", user "postgres", database "Cs
    s330-43", SSL off
      

  6.   

    你的pg_hba.conf文件没有设置正确?内容是什么?
     试试
     host all all 127.0.0.1/32 trust
     然后重启数据库试试看。