You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d41e07a
Browse filesBrowse the repository at this point in the historyBrowse files
# This function is intended to be used by client applications that wish to send commands like <tt>ALTER USER joe PASSWORD 'pwd'</tt>.
559
-
# It is good practice not to send the original cleartext password in such a command, because it might be exposed in command logs, activity displays, and so on.
560
-
# Instead, use this function to convert the password to encrypted form before it is sent.
561
-
#
562
-
# The +password+ and +username+ arguments are the cleartext password, and the SQL name of the user it is for.
563
-
# +algorithm+ specifies the encryption algorithm to use to encrypt the password.
564
-
# Currently supported algorithms are +md5+ and +scram-sha-256+ (+on+ and +off+ are also accepted as aliases for +md5+, for compatibility with older server versions).
565
-
# Note that support for +scram-sha-256+ was introduced in PostgreSQL version 10, and will not work correctly with older server versions.
566
-
# If algorithm is omitted or +nil+, this function will query the server for the current value of the +password_encryption+ setting.
567
-
# That can block, and will fail if the current transaction is aborted, or if the connection is busy executing another query.
568
-
# If you wish to use the default algorithm for the server but want to avoid blocking, query +password_encryption+ yourself before calling #encrypt_password, and pass that value as the algorithm.
569
-
#
570
-
# Return value is the encrypted password.
571
-
# The caller can assume the string doesn't contain any special characters that would require escaping.
572
-
#
573
-
# Available since PostgreSQL-10.
574
-
# See also corresponding {libpq function}[https://www.postgresql.org/docs/current/libpq-misc.html#LIBPQ-PQENCRYPTPASSWORDCONN].
# This function is intended to be used by client applications that wish to send commands like <tt>ALTER USER joe PASSWORD 'pwd'</tt>.
558
+
# It is good practice not to send the original cleartext password in such a command, because it might be exposed in command logs, activity displays, and so on.
559
+
# Instead, use this function to convert the password to encrypted form before it is sent.
560
+
#
561
+
# The +password+ and +username+ arguments are the cleartext password, and the SQL name of the user it is for.
562
+
# +algorithm+ specifies the encryption algorithm to use to encrypt the password.
563
+
# Currently supported algorithms are +md5+ and +scram-sha-256+ (+on+ and +off+ are also accepted as aliases for +md5+, for compatibility with older server versions).
564
+
# Note that support for +scram-sha-256+ was introduced in PostgreSQL version 10, and will not work correctly with older server versions.
565
+
# If algorithm is omitted or +nil+, this function will query the server for the current value of the +password_encryption+ setting.
566
+
# That can block, and will fail if the current transaction is aborted, or if the connection is busy executing another query.
567
+
# If you wish to use the default algorithm for the server but want to avoid blocking, query +password_encryption+ yourself before calling #encrypt_password, and pass that value as the algorithm.
568
+
#
569
+
# Return value is the encrypted password.
570
+
# The caller can assume the string doesn't contain any special characters that would require escaping.
571
+
#
572
+
# See also corresponding {libpq function}[https://www.postgresql.org/docs/current/libpq-misc.html#LIBPQ-PQENCRYPTPASSWORDCONN].
0 commit comments