|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.199 2005/11/04 23:14:00 petere Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.200 2005/12/23 01:16:37 tgl Exp $ |
3 | 3 | -->
|
4 | 4 |
|
5 | 5 | <chapter id="libpq">
|
@@ -3565,6 +3565,40 @@ void PQuntrace(PGconn *conn);
|
3565 | 3565 |
|
3566 | 3566 | </sect1>
|
3567 | 3567 |
|
| 3568 | +<sect1 id="libpq-misc"> |
| 3569 | +<title>Miscellaneous Functions</title> |
| 3570 | + |
| 3571 | +<para> |
| 3572 | +As always, there are some functions that just don't fit anywhere. |
| 3573 | +</para> |
| 3574 | + |
| 3575 | +<variablelist> |
| 3576 | +<varlistentry> |
| 3577 | +<term><function>pg_make_encrypted_password</function><indexterm><primary>pg_make_encrypted_password</></></term> |
| 3578 | +<listitem> |
| 3579 | +<para> |
| 3580 | +Prepares the encrypted form of a <productname>PostgreSQL</> password. |
| 3581 | +<synopsis> |
| 3582 | +char *pg_make_encrypted_password(const char *passwd, const char *user); |
| 3583 | +</synopsis> |
| 3584 | +<function>pg_make_encrypted_password</> is intended to be used by client |
| 3585 | +applications that wish to send commands like |
| 3586 | +<literal>ALTER USER joe PASSWORD 'pwd'</>. |
| 3587 | +It is good practice not to send the original cleartext password in such a |
| 3588 | +command, because it might be exposed in command logs, activity displays, |
| 3589 | +and so on. Instead, use this function to convert the password to encrypted |
| 3590 | +form before it is sent. The arguments are the cleartext password, and the SQL |
| 3591 | +name of the user it is for. The return value is a malloc'd string, or NULL if |
| 3592 | +out-of-memory. The caller may assume the string doesn't contain any weird |
| 3593 | +characters that would require escaping. Use <function>PQfreemem</> to free |
| 3594 | +the result when done with it. |
| 3595 | +</para> |
| 3596 | +</listitem> |
| 3597 | +</varlistentry> |
| 3598 | +</variablelist> |
| 3599 | + |
| 3600 | +</sect1> |
| 3601 | + |
3568 | 3602 | <sect1 id="libpq-notice-processing">
|
3569 | 3603 | <title>Notice Processing</title>
|
3570 | 3604 |
|
|