Authentication: Password passed部分连接字符串参数在PostgresSql 13.1中不被



最近我们已经将postgres数据库升级到13.1版本。之后,我们将面对连接字符串

的奇怪行为。使用PostgresSql 12.3命令成功连接数据库,但没有提示输入密码

**postgres=# connect "dbname=dm_test_db4_db user=test_db4 host=localhost port=5432 password=password";
You are now connected to database "dm_test_db4_db" as user "test_db4".*

使用PostgresSql 13.1输入密码提示,如果我们提供密码连接成功。

*postgres=# connect "dbname=dm_test_db4_db user=test_db4 host=localhost port=5432 password=password";
Password for user test_db4:
You are now connected to database "dm_test_db4_db" as user "test_db4".*

由于这些命令是sql脚本的一部分,没有给出输入,脚本失败,身份验证失败。

这是我的环境细节

postgres版本详细信息:C:Program FilesPostgreSQL13 bin> postgresql .exepostgres (PostgreSQL操作系统:Windows

这些是pg_hba.conf中的设置

- IPv4 local connections:
host    all             all             127.0.0.1/32            md5
- IPv6 local connections:
host    all             all             ::1/128                 md5

知道是什么导致了这种行为吗?

psql的13.1版本有一个bug(客户端程序,而不是数据库服务器)。在13.2

最新更新