PHP 8.4.22 Released!

pg_change_password

(PHP 8 >= 8.4.0)

pg_change_passwordChange a PostgreSQL user's password

说明

function pg_change_password(PgSql\Connection $connection, string $user, string $password): bool

pg_change_password() changes the password of a PostgreSQL user. This function uses the PQchangePassword libpq function which handles password encryption automatically based on the server's settings.

参数

connection
PgSql\Connection 实例。
user
The name of the PostgreSQL user whose password to change.
password
The new password.

返回值

成功时返回 true, 或者在失败时返回 false

参见

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top