| 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>PgGetConnectionId</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_copy_complete" href="pgtcl-pgcopycomplete.html"> |
| 12 |
<link rel="NEXT" title="Tcl Namespace Support" href="pgtcl-tclnamespace.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-pgcopycomplete.html" accesskey="P">Prev</a></td> |
| 23 |
<td width="10%" align="left" valign="top"><a href="pgtcl-pgcopycomplete.html">Fast Backward</a></td> |
| 24 |
<td width="60%" align="center" valign="bottom"></td> |
| 25 |
<td width="10%" align="right" valign="top"><a href="libpgtcl.html">Fast Forward</a></td> |
| 26 |
<td width="10%" align="right" valign="top"><a href="pgtcl-tclnamespace.html" accesskey="N">Next</a></td> |
| 27 |
</tr> |
| 28 |
</table> |
| 29 |
<hr align="left" width="100%"></div> |
| 30 |
<h1><a name="PGTCL-PGGETCONNECTIONID" id="PGTCL-PGGETCONNECTIONID"></a>PgGetConnectionId</h1> |
| 31 |
<div class="REFNAMEDIV"><a name="AEN2816" id="AEN2816"></a> |
| 32 |
<h2>Name</h2> |
| 33 |
PgGetConnectionId -- Provides access to the underlying <tt class="LITERAL">libpq</tt> SQL connection handle. <a name="IX-PGTCL-C-API-2" id="IX-PGTCL-C-API-2"></a></div> |
| 34 |
<div class="REFSYNOPSISDIV"><a name="AEN2822" id="AEN2822"></a> |
| 35 |
<h2>Synopsis</h2> |
| 36 |
<pre class="SYNOPSIS">extern PGconn *PgGetConnectionId(Tcl_Interp *interp, const char *handle, Pg_ConnectionId **connid);</pre></div> |
| 37 |
<div class="REFSECT1"><a name="AEN2824" id="AEN2824"></a> |
| 38 |
<h2>Description</h2> |
| 39 |
<p><code class="FUNCTION">PgGetConnectionId</code> returns the underlying <tt class="LITERAL">PGconn</tt> handle. This is intended to allow Tcl extensions to Pgtcl to use the existing database connection.</p> |
| 40 |
<p>The <tt class="LITERAL">Pg_ConnectionId</tt> structure provides access to more internals of the Pgtcl handle, but may be ignored in most cases.</p> |
| 41 |
</div> |
| 42 |
<div class="REFSECT1"><a name="AEN2831" id="AEN2831"></a> |
| 43 |
<h2>Parameters</h2> |
| 44 |
<div class="VARIABLELIST"> |
| 45 |
<dl> |
| 46 |
<dt>Tcl_Interp *<code class="PARAMETER">interp</code></dt> |
| 47 |
<dd> |
| 48 |
<p>Pointer to Tcl interpreter.</p> |
| 49 |
</dd> |
| 50 |
<dt>char *<code class="PARAMETER">handle</code></dt> |
| 51 |
<dd> |
| 52 |
<p>The name of the Pgtcl database handle command.</p> |
| 53 |
</dd> |
| 54 |
<dt>Pg_ConnectionId **<code class="PARAMETER">connid</code></dt> |
| 55 |
<dd> |
| 56 |
<p>Pointer to address to hold Pgtcl connection handle. Must be provided even if not used.</p> |
| 57 |
</dd> |
| 58 |
</dl> |
| 59 |
</div> |
| 60 |
</div> |
| 61 |
<div class="REFSECT1"><a name="AEN2849" id="AEN2849"></a> |
| 62 |
<h2>Returns</h2> |
| 63 |
<p>PGconn *<code class="PARAMETER">conn</code> is a pointer to the libpq SQL database connection.</p> |
| 64 |
</div> |
| 65 |
<div class="NAVFOOTER"> |
| 66 |
<hr align="left" width="100%"> |
| 67 |
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0"> |
| 68 |
<tr> |
| 69 |
<td width="33%" align="left" valign="top"><a href="pgtcl-pgcopycomplete.html" accesskey="P">Prev</a></td> |
| 70 |
<td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td> |
| 71 |
<td width="33%" align="right" valign="top"><a href="pgtcl-tclnamespace.html" accesskey="N">Next</a></td> |
| 72 |
</tr> |
| 73 |
<tr> |
| 74 |
<td width="33%" align="left" valign="top">pg_copy_complete</td> |
| 75 |
<td width="34%" align="center" valign="top"><a href="libpgtcl-ref.html" accesskey="U">Up</a></td> |
| 76 |
<td width="33%" align="right" valign="top">Tcl Namespace Support</td> |
| 77 |
</tr> |
| 78 |
</table> |
| 79 |
</div> |
| 80 |
</body> |
| 81 |
</html> |