Home Explore Blog CI



postgresql

61th chunk of `doc/src/sgml/protocol.sgml`
f8e3dc5114b0a36fc96ca6ffb96e2702a6e9b504e32162a90000000100000fb4
 be zero.
         As a special case, -1 indicates a NULL column value.
         No value bytes follow in the NULL case.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Byte<replaceable>n</replaceable></term>
       <listitem>
        <para>
         The value of the column, in the format indicated by the
         associated format code.
         <replaceable>n</replaceable> is the above length.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-message-formats-Describe">
    <term>Describe (F)</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('D')</term>
       <listitem>
        <para>
         Identifies the message as a Describe command.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32</term>
       <listitem>
        <para>
         Length of message contents in bytes, including self.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Byte1</term>
       <listitem>
        <para>
         '<literal>S</literal>' to describe a prepared statement; or
         '<literal>P</literal>' to describe a portal.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>String</term>
       <listitem>
        <para>
         The name of the prepared statement or portal to describe
         (an empty string selects the unnamed prepared statement
         or portal).
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-message-formats-EmptyQueryResponse">
    <term>EmptyQueryResponse (B)</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('I')</term>
       <listitem>
        <para>
         Identifies the message as a response to an empty query string.
         (This substitutes for CommandComplete.)
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32(4)</term>
       <listitem>
        <para>
         Length of message contents in bytes, including self.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-message-formats-ErrorResponse">
    <term>ErrorResponse (B)</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('E')</term>
       <listitem>
        <para>
         Identifies the message as an error.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32</term>
       <listitem>
        <para>
         Length of message contents in bytes, including self.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>

     <para>
      The message body consists of one or more identified fields,
      followed by a zero byte as a terminator.  Fields can appear in
      any order.  For each field there is the following:
     </para>

     <variablelist>
      <varlistentry>
       <term>Byte1</term>
       <listitem>
        <para>
         A code identifying the field type; if zero, this is
         the message terminator and no string follows.
         The presently defined field types are listed in
         <xref linkend="protocol-error-fields"/>.
         Since more field types might be added in future,
         frontends should silently ignore fields of unrecognized
         type.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>String</term>
       <listitem>
        <para>
         The field value.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-message-formats-Execute">
    <term>Execute (F)</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('E')</term>

Title: PostgreSQL Protocol Message Formats
Summary
This section details the message formats for various PostgreSQL operations, including Describe, EmptyQueryResponse, ErrorResponse, and Execute, describing the structure and content of each message type, including message identification, length, and field values, and explains how these messages are used in PostgreSQL protocols to handle errors, execute queries, and describe database objects.