v2-0003-change-pw-doc.patch

text/x-patch

Filename: v2-0003-change-pw-doc.patch
Type: text/x-patch
Part: 2
Message: Re: Password leakage avoidance

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
Series: patch v2-0003
File+
doc/src/sgml/libpq.sgml 0 0
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index ed88ac0..983027b 100644
*** a/doc/src/sgml/libpq.sgml
--- b/doc/src/sgml/libpq.sgml
*************** char *PQencryptPasswordConn(PGconn *conn
*** 7116,7121 ****
--- 7116,7159 ----
      </listitem>
     </varlistentry>
  
+    <varlistentry id="libpq-PQchangePassword">
+     <term><function>PQchangePassword</function><indexterm><primary>PQchangePassword</primary></indexterm></term>
+ 
+     <listitem>
+      <para>
+       Changes a <productname>PostgreSQL</productname> password.
+ <synopsis>
+ PGresult *PQchangePassword(PGconn *conn, const char *user, const char *passwd);
+ </synopsis>
+       This function uses <function>PQencryptPasswordConn</function>
+       to build and execute the command <literal>ALTER USER ... PASSWORD
+       '...'</literal>, thereby changing the user's password. It exists for
+       the same reason as <function>PQencryptPasswordConn</function>, but
+       is more convenient as it both builds and runs the command for you.
+       <xref linkend="libpq-PQencryptPasswordConn"/> is passed a
+       <symbol>NULL</symbol> for the algorithm argument, hence encryption is
+       done according to the server's password_encryption setting.
+      </para>
+ 
+      <para>
+       The <parameter>user</parameter> and <parameter>passwd</parameter> arguments
+       are the SQL name of the target user, and the new cleartext password.
+      </para>
+ 
+      <para>
+       Returns a <structname>PGresult</structname> pointer representing
+       the result of the <literal>ALTER USER</literal> command, or
+       a null pointer if the routine failed before issuing any command.
+       The <xref linkend="libpq-PQresultStatus"/> function should be called
+       to check the return value for any errors (including the value of a null
+       pointer, in which case it will return
+       <symbol>PGRES_FATAL_ERROR</symbol>). Use
+       <xref linkend="libpq-PQerrorMessage"/> to get more information about
+       such errors.
+      </para>
+     </listitem>
+    </varlistentry>
+ 
     <varlistentry id="libpq-PQencryptPassword">
      <term><function>PQencryptPassword</function><indexterm><primary>PQencryptPassword</primary></indexterm></term>