summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-08 18:28:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-08 18:28:56 +0000
commit5f7b1f8d9d835c6869637f0b0df184e6fc5e0d03 (patch)
tree7f0f6ef73d6f8e2014a935b73a214ab7ab1aefde /doc/src
parent3f33d7bcb677d4607420f11683209c1c9d1fccea (diff)
Closer code review for PQconnectionUsedPassword() patch: in particular,
not OK to include postgres_fe.h into libpq-fe.h, hence declare it as returning int not bool.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml35
1 files changed, 20 insertions, 15 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index bbaade6944f..e788fa109b7 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.236 2007/07/08 17:11:50 joe Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.237 2007/07/08 18:28:55 tgl Exp $ -->
<chapter id="libpq">
<title><application>libpq</application> - C Library</title>
@@ -1035,6 +1035,25 @@ int PQbackendPID(const PGconn *conn);
</varlistentry>
<varlistentry>
+ <term><function>PQconnectionUsedPassword</function><indexterm><primary>PQconnectionUsedPassword</></></term>
+ <listitem>
+ <para>
+ Returns true (1) if the connection authentication method
+ required a password to be supplied. Returns false (0) if not.
+<synopsis>
+int PQconnectionUsedPassword(const PGconn *conn);
+</synopsis>
+ </para>
+
+ <para>
+ 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.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><function>PQgetssl</function><indexterm><primary>PQgetssl</></></term>
<listitem>
<para>
@@ -1059,20 +1078,6 @@ SSL *PQgetssl(const PGconn *conn);
</listitem>
</varlistentry>
- <varlistentry>
- <term><function>PQconnectionUsedPassword</function><indexterm><primary>PQconnectionUsedPassword</></></term>
- <listitem>
- <para>
- Returns true (1) if the connection authentication method
- required a password to be supplied. Returns false (0)
- otherwise.
- <synopsis>
- bool PQconnectionUsedPassword(const PGconn *conn);
- </synopsis>
- </para>
- </listitem>
- </varlistentry>
-
</variablelist>
</para>