aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2012-11-30 15:09:18 +0900
committerMagnus Hagander <magnus@hagander.net>2012-11-30 15:11:08 +0900
commit65c3bf19fd3e1f6a591618e92eb4c54d0b217564 (patch)
tree7007982b7862d52dec118f850a3da59a7bb76b74 /doc/src
parent4af446e7cd0b37bb5d7fa9b73193c68e14239499 (diff)
downloadpostgresql-65c3bf19fd3e1f6a591618e92eb4c54d0b217564.tar.gz
postgresql-65c3bf19fd3e1f6a591618e92eb4c54d0b217564.zip
Add libpq function PQconninfo()
This allows a caller to get back the exact conninfo array that was used to create a connection, including parameters read from the environment. In doing this, restructure how options are copied from the conninfo to the actual connection. Zoltan Boszormenyi and Magnus Hagander
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 255c5c1abb8..e7ad066fe51 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -496,6 +496,30 @@ typedef struct
</listitem>
</varlistentry>
+ <varlistentry id="libpq-pqconninfo">
+ <term><function>PQconninfo</function><indexterm><primary>PQconninfo</></></term>
+ <listitem>
+ <para>
+ Returns the connection options used by a live connection.
+<synopsis>
+PQconninfoOption *PQconninfo(PGconn *conn);
+</synopsis>
+ </para>
+
+ <para>
+ Returns a connection options array. This can be used to determine
+ all possible <function>PQconnectdb</function> options and the
+ values that were used to connect to the server. The return
+ value points to an array of <structname>PQconninfoOption</structname>
+ structures, which ends with an entry having a null <structfield>keyword</>
+ pointer. All notes above for <function>PQconndefaults</function> also
+ apply to the result of <function>PQconninfo</function>.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+
<varlistentry id="libpq-pqconninfoparse">
<term><function>PQconninfoParse</function><indexterm><primary>PQconninfoParse</></></term>
<listitem>