Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit65c3bf1

Browse files
committed
Add libpq function PQconninfo()
This allows a caller to get back the exact conninfo array that wasused to create a connection, including parameters read from theenvironment.In doing this, restructure how options are copied from the conninfoto the actual connection.Zoltan Boszormenyi and Magnus Hagander
1 parent4af446e commit65c3bf1

File tree

4 files changed

+194
-106
lines changed

4 files changed

+194
-106
lines changed

‎doc/src/sgml/libpq.sgml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,30 @@ typedef struct
496496
</listitem>
497497
</varlistentry>
498498

499+
<varlistentry id="libpq-pqconninfo">
500+
<term><function>PQconninfo</function><indexterm><primary>PQconninfo</></></term>
501+
<listitem>
502+
<para>
503+
Returns the connection options used by a live connection.
504+
<synopsis>
505+
PQconninfoOption *PQconninfo(PGconn *conn);
506+
</synopsis>
507+
</para>
508+
509+
<para>
510+
Returns a connection options array. This can be used to determine
511+
all possible <function>PQconnectdb</function> options and the
512+
values that were used to connect to the server. The return
513+
value points to an array of <structname>PQconninfoOption</structname>
514+
structures, which ends with an entry having a null <structfield>keyword</>
515+
pointer. All notes above for <function>PQconndefaults</function> also
516+
apply to the result of <function>PQconninfo</function>.
517+
</para>
518+
519+
</listitem>
520+
</varlistentry>
521+
522+
499523
<varlistentry id="libpq-pqconninfoparse">
500524
<term><function>PQconninfoParse</function><indexterm><primary>PQconninfoParse</></></term>
501525
<listitem>

‎src/interfaces/libpq/exports.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,4 @@ PQsetSingleRowMode 161
164164
lo_lseek64 162
165165
lo_tell64 163
166166
lo_truncate64 164
167+
PQconninfo 165

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp