【发布时间】:2021-10-15 03:28:43
【问题描述】:
我正在尝试执行脚本以在 postgres 中创建角色
$PSQL_CLIENT "host=$servername user=$DB_POSTGRES_USERNAME dbname=postgres password='$DB_PASSWORD'"
问题在于密码有 6 个单词,例如 (alpha beta charlie) 和空格,我不允许更改它
我也试过了:
$PSQL_CLIENT "host=$servername user=$DB_USERNAME dbname=postgres password=/"$DB_PASSWORD"/"
每次我尝试连接时都会看到此错误
psql: warning: extra command-line argument "password content" ignored
psql: warning: extra command-line argument "password content" ignored
psql: warning: extra command-line argument "password content" ignored
psql: warning: extra command-line argument "password content," ignored
我认为password=/"$DB_PASSWORD"/" 必须更改某些内容,不确定要正确读取密码究竟需要做什么。任何帮助将不胜感激
【问题讨论】:
标签: psql