pg_encrypt_password

pg_encrypt_password — Encrypt a password/username combination

Synopsis

pg_encrypt_password password username

Description

pg_encrypt_password prepares the encrypted form of a PostgreSQL password. This is used to send encrypted (rather than clear-text) passwords to commands that can take a pre-encrypted password, such as ALTER ROLE.

Arguments

password

The password to encrypt.

username

The username that goes with the password to encrypt.

Return Value

The encrypted password string.

Notes

The username is required because the encryption method uses both the username and password to form the encrypted password string.

This command was added in pgtclng-1.7.0 and in pgintcl-3.1.0.

This command uses or emulates the PostgreSQL libpq function PQencryptPassword.

SourceForge.net Logo

This version of the manual was produced for the Pgtcl-ng Sourceforge project web service site, which requires the logo on each page.

To download a logo-free copy of the manual, see the Pgtcl-ng project downloads area.