Home Explore Blog CI



postgresql

85th chunk of `doc/src/sgml/protocol.sgml`
b21608e698650125f8ade24b39e12f6149de729ab8669cc80000000100000d35
 </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
  </variablelist>

  <para>
   The following message parts are shared by the above messages.
  </para>

  <variablelist>
   <varlistentry id="protocol-logicalrep-message-formats-TupleData">
    <term>TupleData</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Int16</term>
       <listitem>
        <para>
         Number of columns.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>

     <para>
      Next, one of the following submessages appears for each published column:

      <variablelist>
       <varlistentry>
        <term>Byte1('n')</term>
        <listitem>
         <para>
          Identifies the data as NULL value.
         </para>
        </listitem>
       </varlistentry>
      </variablelist>
      Or
      <variablelist>
       <varlistentry>
        <term>Byte1('u')</term>
        <listitem>
         <para>
          Identifies unchanged TOASTed value (the actual value is not
          sent).
         </para>
        </listitem>
       </varlistentry>
      </variablelist>
      Or
      <variablelist>
       <varlistentry>
        <term>Byte1('t')</term>
        <listitem>
         <para>
          Identifies the data as text formatted value.
         </para>
        </listitem>
       </varlistentry>
      </variablelist>
      Or
      <variablelist>
       <varlistentry>
        <term>Byte1('b')</term>
        <listitem>
         <para>
          Identifies the data as binary formatted value.
         </para>
        </listitem>
       </varlistentry>

       <varlistentry>
        <term>Int32</term>
        <listitem>
         <para>
          Length of the column value.
         </para>
        </listitem>
       </varlistentry>

       <varlistentry>
        <term>Byte<replaceable>n</replaceable></term>
        <listitem>
         <para>
          The value of the column, either in binary or in text format.
          (As specified in the preceding format byte).
          <replaceable>n</replaceable> is the above length.
         </para>
        </listitem>
       </varlistentry>
      </variablelist>
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </sect1>

 <sect1 id="protocol-changes">
  <title>Summary of Changes since Protocol 2.0</title>

  <para>
   This section provides a quick checklist of changes, for the benefit of
   developers trying to update existing client libraries to protocol 3.0.
  </para>

  <para>
   The initial startup packet uses a flexible list-of-strings format
   instead of a fixed format.  Notice that session default values for run-time
   parameters can now be specified directly in the startup packet.  (Actually,
   you could do that before using the <literal>options</literal> field, but given the
   limited width of <literal>options</literal> and the lack of any way to quote
   whitespace in the values, it wasn't a very safe technique.)
  </para>

  <para>
   All messages now have a length count immediately following the message type
   byte (except for startup packets, which have no type byte).  Also note that
   PasswordMessage now has a type byte.
  </para>

  <para>
   ErrorResponse and NoticeResponse ('<literal>E</literal>' and '<literal>N</literal>')
   messages now contain multiple fields,

Title: Tuple Data Message Format and Protocol Changes
Summary
This section describes the format of tuple data messages, including the identification of NULL values, unchanged TOASTed values, text formatted values, and binary formatted values, as well as the changes in protocol version 3.0, such as the use of a flexible list-of-strings format in the startup packet, the inclusion of a length count in all messages, and modifications to ErrorResponse and NoticeResponse messages.