-
+
+
+
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);
- 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.