Home Explore Blog CI



postgresql

74th chunk of `doc/src/sgml/libpq.sgml`
d3dce82f949abea2d75856778d1ec72215014feac32258480000000100000fa0
 </listitem>
    </varlistentry>

    <varlistentry id="libpq-PQsendQueryPrepared">
     <term><function>PQsendQueryPrepared</function><indexterm><primary>PQsendQueryPrepared</primary></indexterm></term>

     <listitem>
      <para>
       Sends a request to execute a prepared statement with given
       parameters, without waiting for the result(s).
<synopsis>
int PQsendQueryPrepared(PGconn *conn,
                        const char *stmtName,
                        int nParams,
                        const char * const *paramValues,
                        const int *paramLengths,
                        const int *paramFormats,
                        int resultFormat);
</synopsis>

       This is similar to <xref linkend="libpq-PQsendQueryParams"/>, but
       the command to be executed is specified by naming a
       previously-prepared statement, instead of giving a query string.
       The function's parameters are handled identically to
       <xref linkend="libpq-PQexecPrepared"/>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="libpq-PQsendDescribePrepared">
     <term><function>PQsendDescribePrepared</function><indexterm><primary>PQsendDescribePrepared</primary></indexterm></term>

     <listitem>
      <para>
       Submits a request to obtain information about the specified
       prepared statement, without waiting for completion.
<synopsis>
int PQsendDescribePrepared(PGconn *conn, const char *stmtName);
</synopsis>

       This is an asynchronous version of <xref linkend="libpq-PQdescribePrepared"/>:
       it returns 1 if it was able to dispatch the request, and 0 if not.
       After a successful call, call <xref linkend="libpq-PQgetResult"/> to
       obtain the results.  The function's parameters are handled
       identically to <xref linkend="libpq-PQdescribePrepared"/>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="libpq-PQsendDescribePortal">
     <term><function>PQsendDescribePortal</function><indexterm><primary>PQsendDescribePortal</primary></indexterm></term>

     <listitem>
      <para>
       Submits a request to obtain information about the specified
       portal, without waiting for completion.
<synopsis>
int PQsendDescribePortal(PGconn *conn, const char *portalName);
</synopsis>

       This is an asynchronous version of <xref linkend="libpq-PQdescribePortal"/>:
       it returns 1 if it was able to dispatch the request, and 0 if not.
       After a successful call, call <xref linkend="libpq-PQgetResult"/> to
       obtain the results.  The function's parameters are handled
       identically to <xref linkend="libpq-PQdescribePortal"/>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="libpq-PQsendClosePrepared">
     <term><function>PQsendClosePrepared</function><indexterm><primary>PQsendClosePrepared</primary></indexterm></term>

     <listitem>
      <para>
       Submits a request to close the specified prepared statement, without
       waiting for completion.
<synopsis>
int PQsendClosePrepared(PGconn *conn, const char *stmtName);
</synopsis>

       This is an asynchronous version of <xref linkend="libpq-PQclosePrepared"/>:
       it returns 1 if it was able to dispatch the request, and 0 if not.
       After a successful call, call <xref linkend="libpq-PQgetResult"/> to
       obtain the results.  The function's parameters are handled
       identically to <xref linkend="libpq-PQclosePrepared"/>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="libpq-PQsendClosePortal">
     <term><function>PQsendClosePortal</function><indexterm><primary>PQsendClosePortal</primary></indexterm></term>

     <listitem>
      <para>
       Submits a request to close specified portal, without waiting for
       completion.
<synopsis>
int PQsendClosePortal(PGconn *conn, const char *portalName);
</synopsis>

       This is an asynchronous version of <xref linkend="libpq-PQclosePortal"/>:
       it returns 1

Title: Asynchronous Functions for Prepared Statements and Portals: PQsendDescribePrepared, PQsendDescribePortal, PQsendClosePrepared, and PQsendClosePortal
Summary
This section details asynchronous functions for working with prepared statements and portals. `PQsendDescribePrepared` and `PQsendDescribePortal` request information about a prepared statement or portal, respectively. `PQsendClosePrepared` and `PQsendClosePortal` request closing a prepared statement or portal. Each function returns 1 if the request is successfully dispatched, 0 otherwise, and `PQgetResult` must be called to obtain the results.