Postgresql: Scripting psql execution with password

后端 未结 16 2527
谎友^
谎友^ 2020-11-28 18:54

How can I call psql so that it doesn\'t prompt for a password?

This is what I have:

psql -Umyuser < myscript.sql         


        
16条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 19:03

    You have to create a password file: see http://www.postgresql.org/docs/9.0/interactive/libpq-pgpass.html for more info.

提交回复
热议问题