Home Explore Blog CI



postgresql

54th chunk of `doc/src/sgml/libpq.sgml`
462bf20b5ea16b64b3fae93b1d7c627e3d2d819e648bde260000000100000fa0
 <term><literal>PGRES_BAD_RESPONSE</literal></term>
          <listitem>
           <para>
            The server's response was not understood.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry id="libpq-pgres-nonfatal-error">
          <term><literal>PGRES_NONFATAL_ERROR</literal></term>
          <listitem>
           <para>
            A nonfatal error (a notice or warning) occurred.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry id="libpq-pgres-fatal-error">
          <term><literal>PGRES_FATAL_ERROR</literal></term>
          <listitem>
           <para>
            A fatal error occurred.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry id="libpq-pgres-copy-both">
          <term><literal>PGRES_COPY_BOTH</literal></term>
          <listitem>
           <para>
            Copy In/Out (to and from server) data transfer started.  This
            feature is currently used only for streaming replication,
            so this status should not occur in ordinary applications.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry id="libpq-pgres-single-tuple">
          <term><literal>PGRES_SINGLE_TUPLE</literal></term>
          <listitem>
           <para>
            The <structname>PGresult</structname> contains a single result tuple
            from the current command.  This status occurs only when
            single-row mode has been selected for the query
            (see <xref linkend="libpq-single-row-mode"/>).
           </para>
          </listitem>
         </varlistentry>

         <varlistentry id="libpq-pgres-tuples-chunk">
          <term><literal>PGRES_TUPLES_CHUNK</literal></term>
          <listitem>
           <para>
            The <structname>PGresult</structname> contains several result tuples
            from the current command.  This status occurs only when
            chunked mode has been selected for the query
            (see <xref linkend="libpq-single-row-mode"/>).
            The number of tuples will not exceed the limit passed to
            <xref linkend="libpq-PQsetChunkedRowsMode"/>.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry id="libpq-pgres-pipeline-sync">
          <term><literal>PGRES_PIPELINE_SYNC</literal></term>
          <listitem>
           <para>
            The <structname>PGresult</structname> represents a
            synchronization point in pipeline mode, requested by either
            <xref linkend="libpq-PQpipelineSync"/> or
            <xref linkend="libpq-PQsendPipelineSync"/>.
            This status occurs only when pipeline mode has been selected.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry id="libpq-pgres-pipeline-aborted">
          <term><literal>PGRES_PIPELINE_ABORTED</literal></term>
          <listitem>
           <para>
            The <structname>PGresult</structname> represents a pipeline that has
            received an error from the server.  <function>PQgetResult</function>
            must be called repeatedly, and each time it will return this status code
            until the end of the current pipeline, at which point it will return
            <literal>PGRES_PIPELINE_SYNC</literal> and normal processing can
            resume.
           </para>
          </listitem>
         </varlistentry>

        </variablelist>

        If the result status is <literal>PGRES_TUPLES_OK</literal>,
        <literal>PGRES_SINGLE_TUPLE</literal>, or
        <literal>PGRES_TUPLES_CHUNK</literal>, then
        the functions described below can be used to retrieve the rows
        returned by the query.  Note that a <command>SELECT</command>
        command that happens to retrieve zero rows still shows
        <literal>PGRES_TUPLES_OK</literal>.
        <literal>PGRES_COMMAND_OK</literal> is for commands that can never
  

Title: PGresultStatus Return Values (Continued)
Summary
This section continues the description of possible return values for the `PQresultStatus` function. It details status codes such as `PGRES_COPY_BOTH` (used for streaming replication), `PGRES_SINGLE_TUPLE` (occurs in single-row mode), `PGRES_TUPLES_CHUNK` (occurs in chunked mode), `PGRES_PIPELINE_SYNC` (represents a synchronization point in pipeline mode), and `PGRES_PIPELINE_ABORTED` (indicates an error in pipeline mode). It also notes that `PGRES_TUPLES_OK`, `PGRES_SINGLE_TUPLE`, and `PGRES_TUPLES_CHUNK` allow retrieval of rows, while `PGRES_COMMAND_OK` is for commands that never return rows.