Home Explore Blog CI



postgresql

69th chunk of `doc/src/sgml/protocol.sgml`
e70d99e7da4f9717eed8f27d9b8729b082eea77c8e898a130000000100000fae
 <listitem>
        <para>
         Current backend transaction status indicator.
         Possible values are '<literal>I</literal>' if idle (not in
         a transaction block); '<literal>T</literal>' if in a transaction
         block; or '<literal>E</literal>' if in a failed transaction
         block (queries will be rejected until block is ended).
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-message-formats-RowDescription">
    <term>RowDescription (B)</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('T')</term>
       <listitem>
        <para>
         Identifies the message as a row description.
        </para>
       </listitem>
      </varlistentry>

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

      <varlistentry>
       <term>Int16</term>
       <listitem>
        <para>
         Specifies the number of fields in a row (can be zero).
        </para>
       </listitem>
      </varlistentry>
     </variablelist>

     <para>
      Then, for each field, there is the following:
     </para>

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

      <varlistentry>
       <term>Int32</term>
       <listitem>
        <para>
         If the field can be identified as a column of a specific
         table, the object ID of the table; otherwise zero.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int16</term>
       <listitem>
        <para>
         If the field can be identified as a column of a specific
         table, the attribute number of the column; otherwise zero.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32</term>
       <listitem>
        <para>
         The object ID of the field's data type.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int16</term>
       <listitem>
        <para>
         The data type size (see <varname>pg_type.typlen</varname>).
         Note that negative values denote variable-width types.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32</term>
       <listitem>
        <para>
         The type modifier (see <varname>pg_attribute.atttypmod</varname>).
         The meaning of the modifier is type-specific.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int16</term>
       <listitem>
        <para>
         The format code being used for the field.  Currently will
         be zero (text) or one (binary).  In a RowDescription
         returned from the statement variant of Describe, the
         format code is not yet known and will always be zero.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-message-formats-SASLInitialResponse">
    <term>SASLInitialResponse (F)</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Byte1('p')</term>
       <listitem>
        <para>
         Identifies the message as an initial SASL response. Note that
         this is also used for GSSAPI, SSPI and password response messages.
         The exact message type is deduced from the context.
        </para>
       </listitem>
      </varlistentry>

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

      <varlistentry>
       <term>String</term>
       <listitem>
        <para>
         Name of the SASL authentication

Title: PostgreSQL Protocol Message Formats
Summary
This section describes the formats of various PostgreSQL protocol messages, including RowDescription, which contains field information such as name, table and attribute IDs, data type, size, modifier, and format code, and SASLInitialResponse, which identifies the message as an initial SASL response and includes the length and name of the SASL authentication mechanism, providing detailed information for handling database queries and authentication.