| PostgreSQL Reference Manual - Volume 2 - Programming Guide by The PostgreSQL Global Development Group Paperback (6"x9"), 408 pages ISBN 0954612035 RRP £19.95 ($34.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
1.10 Miscellaneous Functions
As always, there are some functions that just don't fit anywhere.
PQencryptPassword-
Prepares the encrypted form of a PostgreSQL password.
char * PQencryptPassword(const char *passwd, const char *user);
This function is intended to be used by client applications that wish to send commands likeALTER USER joe PASSWORD 'pwd'. 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. Instead, use this function to convert the password to encrypted form before it is sent. The arguments are the cleartext password, and the SQL name of the user it is for. The return value is a string allocated bymalloc, orNULLif out of memory. The caller may assume the string doesn't contain any special characters that would require escaping. UsePQfreememto free the result when done with it.
| ISBN 0954612035 | PostgreSQL Reference Manual - Volume 2 - Programming Guide | See the print edition |