且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用命令行参数运行 PostgreSQL .sql 文件

更新时间:2023-11-29 16:40:10

您有四种选择来提供密码:

You have four choices to supply a password:

  1. 设置 PGPASSWORD 环境变量.有关详细信息,请参阅手册:
    http://www.postgresql.org/docs/current/static/libpq-envars.html
  2. 使用 .pgpass 文件来存储密码.有关详细信息,请参阅手册:
    http://www.postgresql.org/docs/current/static/libpq-pgpass.html
  3. 对该特定用户使用信任身份验证":http://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-TRUST
  4. 从 PostgreSQL 9.1 开始,您还可以使用连接字符串:
    https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING