Debian Codegraph @

doc/html/pgtcl-pgconninfo.html

raw
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.6.0">
6 <title>pg_dbinfo</title>
7 <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
8 <link rev="MADE" href="mailto:[email protected]">
9 <link rel="HOME" title="PostgreSQL Tcl Interface Documentation" href="index.html">
10 <link rel="UP" title="pgtcl Command Reference" href="libpgtcl-ref.html">
11 <link rel="PREVIOUS" title="pg_connect" href="pgtcl-pgconnect.html">
12 <link rel="NEXT" title="pg_disconnect" href="pgtcl-pgdisconnect.html">
13 <link rel="STYLESHEET" type="text/css" href="stylesheet.css">
14 </head>
15 <body class="REFENTRY">
16 <div class="NAVHEADER">
17 <table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
18 <tr>
19 <th colspan="5" align="center" valign="bottom">PostgreSQL Tcl Interface Documentation</th>
20 </tr>
21 <tr>
22 <td width="10%" align="left" valign="top"><a href="pgtcl-pgconnect.html" accesskey="P">Prev</a></td>
23 <td width="10%" align="left" valign="top"><a href="pgtcl-pgconnect.html">Fast Backward</a></td>
24 <td width="60%" align="center" valign="bottom"></td>
25 <td width="10%" align="right" valign="top"><a href="pgtcl-pgdisconnect.html">Fast Forward</a></td>
26 <td width="10%" align="right" valign="top"><a href="pgtcl-pgdisconnect.html" accesskey="N">Next</a></td>
27 </tr>
28 </table>
29 <hr align="left" width="100%"></div>
30 <h1><a name="PGTCL-PGCONNINFO" id="PGTCL-PGCONNINFO"></a>pg_dbinfo</h1>
31 <div class="REFNAMEDIV"><a name="AEN599" id="AEN599"></a>
32 <h2>Name</h2>
33 pg_dbinfo&nbsp;--&nbsp;returns data about the connection<a name="IX-PGTCL-PGCONNINFO-2" id="IX-PGTCL-PGCONNINFO-2"></a></div>
34 <div class="REFSYNOPSISDIV"><a name="AEN604" id="AEN604"></a>
35 <h2>Synopsis</h2>
36 <pre class="SYNOPSIS">pg_dbinfo command ?conn? ?paramname?</pre></div>
37 <div class="REFSECT1"><a name="AEN606" id="AEN606"></a>
38 <h2>Description</h2>
39 <p><code class="FUNCTION">pg_dbinfo</code> returns data about the connection. The first argument is a command, and the second and third argument depend on the command chosen.</p>
40 </div>
41 <div class="REFSECT1"><a name="AEN610" id="AEN610"></a>
42 <h2>Arguments</h2>
43 <div class="VARIABLELIST">
44 <dl>
45 <dt><code class="PARAMETER">command</code></dt>
46 <dd>
47 <div class="VARIABLELIST">
48 <dl>
49 <dt><code class="PARAMETER">connections</code></dt>
50 <dd>
51 <p>Return a list of connection handles.</p>
52 </dd>
53 <dt><code class="PARAMETER">results connHandle</code></dt>
54 <dd>
55 <p>Return a list of result handles for the named connection.</p>
56 </dd>
57 <dt><code class="PARAMETER">version connHandle</code></dt>
58 <dd>
59 <p>Return server version for the connection.</p>
60 </dd>
61 <dt><code class="PARAMETER">protocol connHandle</code></dt>
62 <dd>
63 <p>Return protocol version for the connection.</p>
64 </dd>
65 <dt><code class="PARAMETER">param connHandle name</code></dt>
66 <dd>
67 <p>Return connection's value for the named parameter.</p>
68 </dd>
69 <dt><code class="PARAMETER">backendpid connHandle</code></dt>
70 <dd>
71 <p>Return server process ID for the connection.</p>
72 </dd>
73 <dt><code class="PARAMETER">socket connHandle</code></dt>
74 <dd>
75 <p>Return socket file handle for the connection.</p>
76 </dd>
77 <dt><code class="PARAMETER">sql_count connHandle</code></dt>
78 <dd>
79 <p>Return number of SQL queries that have been made for the connection.</p>
80 </dd>
81 <dt><code class="PARAMETER">dbname connHandle</code></dt>
82 <dd>
83 <p>Return name of the connected database.</p>
84 </dd>
85 <dt><code class="PARAMETER">user connHandle</code></dt>
86 <dd>
87 <p>Return logged in user name.</p>
88 </dd>
89 <dt><code class="PARAMETER">password connHandle</code></dt>
90 <dd>
91 <p>Return logged in user's password.</p>
92 </dd>
93 <dt><code class="PARAMETER">host connHandle</code></dt>
94 <dd>
95 <p>Return address of the connected host.</p>
96 </dd>
97 <dt><code class="PARAMETER">port connHandle</code></dt>
98 <dd>
99 <p>Return host port for the connection.</p>
100 </dd>
101 <dt><code class="PARAMETER">options connHandle</code></dt>
102 <dd>
103 <p>Return command line options passed in the connection request.</p>
104 </dd>
105 <dt><code class="PARAMETER">status connHandle</code></dt>
106 <dd>
107 <p>Return connection status.</p>
108 </dd>
109 <dt><code class="PARAMETER">transaction_status connHandle</code></dt>
110 <dd>
111 <p>Return transaction status.</p>
112 </dd>
113 <dt><code class="PARAMETER">error_message connHandle</code></dt>
114 <dd>
115 <p>Return the most recent error message on the connection.</p>
116 </dd>
117 <dt><code class="PARAMETER">needs_password connHandle</code></dt>
118 <dd>
119 <p>Return true if the connection required a password but none was available.</p>
120 <p>This function can be applied after a failed connection attempt to decide whether to prompt the user for a password.</p>
121 </dd>
122 <dt><code class="PARAMETER">used_password connHandle</code></dt>
123 <dd>
124 <p>Return true if the connection used a password.</p>
125 <p>This function can be applied after either a failed or successful connection attempt to detect whether the server demanded a password.</p>
126 </dd>
127 <dt><code class="PARAMETER">used_ssl connHandle</code></dt>
128 <dd>
129 <p>Return true if the connection uses SSL.</p>
130 </dd>
131 </dl>
132 </div>
133 </dd>
134 <dt><code class="PARAMETER">conn</code></dt>
135 <dd>
136 <p>The handle of the connection, when required.</p>
137 </dd>
138 <dt><code class="PARAMETER">param</code></dt>
139 <dd>
140 <p>The connection parameter name, when the command "param" is provided.</p>
141 </dd>
142 </dl>
143 </div>
144 </div>
145 <div class="REFSECT1"><a name="AEN730" id="AEN730"></a>
146 <h2>Return Value</h2>
147 <p>A Tcl list of connection handle names</p>
148 </div>
149 <div class="NAVFOOTER">
150 <hr align="left" width="100%">
151 <table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
152 <tr>
153 <td width="33%" align="left" valign="top"><a href="pgtcl-pgconnect.html" accesskey="P">Prev</a></td>
154 <td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td>
155 <td width="33%" align="right" valign="top"><a href="pgtcl-pgdisconnect.html" accesskey="N">Next</a></td>
156 </tr>
157 <tr>
158 <td width="33%" align="left" valign="top">pg_connect</td>
159 <td width="34%" align="center" valign="top"><a href="libpgtcl-ref.html" accesskey="U">Up</a></td>
160 <td width="33%" align="right" valign="top">pg_disconnect</td>
161 </tr>
162 </table>
163 </div>
164 </body>
165 </html>