.\" This manpage has been automatically generated by docbook2man 
.\" from a DocBook document.  This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
.\" Please send any bug reports, improvements, comments, patches, 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "PgGetConnectionId" "" "17 September 2020" "" "PostgreSQL Tcl Interface Documentation"

.SH NAME
PgGetConnectionId \- Provides access to the underlying libpq SQL connection handle.

.SH SYNOPSIS

.nf
extern PGconn *PgGetConnectionId(Tcl_Interp *interp, const char *handle, Pg_ConnectionId **connid);
.fi
.SH "DESCRIPTION"
.PP
\fBPgGetConnectionId\fR returns the underlying PGconn handle. This is intended
to allow Tcl extensions to Pgtcl to use the existing database connection.
.PP
The Pg_ConnectionId structure provides access to more internals of the Pgtcl handle, but may be ignored in most cases.
.SH "PARAMETERS"
.TP
\fBTcl_Interp *\fIinterp\fB\fR
Pointer to Tcl interpreter.
.TP
\fBchar *\fIhandle\fB\fR
The name of the Pgtcl database handle command.
.TP
\fBPg_ConnectionId **\fIconnid\fB\fR
Pointer to address to hold Pgtcl connection handle. Must be provided even if not used.
.SH "RETURNS"
.PP
PGconn *\fIconn\fR is a pointer to the libpq SQL database connection.
