diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 3acbe2c3d3..fec498c19a 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,4 +1,4 @@ - + <application>libpq</application> - C Library @@ -1145,12 +1145,33 @@ typedef struct + + PQconnectionNeedsPasswordPQconnectionNeedsPassword + + + Returns true (1) if the connection authentication method + required a password, but none was available. + Returns false (0) if not. + + + int PQconnectionNeedsPassword(const PGconn *conn); + + + + + + This function can be applied after a failed connection attempt + to decide whether to prompt the user for a password. + + + + PQconnectionUsedPasswordPQconnectionUsedPassword Returns true (1) if the connection authentication method - required a password to be supplied. Returns false (0) if not. + used a caller-supplied password. Returns false (0) if not. int PQconnectionUsedPassword(const PGconn *conn); @@ -1159,9 +1180,10 @@ typedef struct - This function can be applied after either successful or failed - connection attempts. In the case of failure, it can for example - be used to decide whether to prompt the user for a password. + This function detects whether a password supplied to the connection + function was actually used. Passwords obtained from other + sources (such as the .pgpass file) are not considered + caller-supplied. diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml index ef4373fe6d..4bb10cbf61 100644 --- a/doc/src/sgml/release.sgml +++ b/doc/src/sgml/release.sgml @@ -1,4 +1,4 @@ - +