Home Explore Blog CI



postgresql

71th chunk of `doc/src/sgml/protocol.sgml`
2ed7abbb731229b889ecb0bc6e127a7cc254d37e389175520000000100000fa0
        <para>
         The <acronym>SSL</acronym> request code.  The value is chosen to contain
         <literal>1234</literal> in the most significant 16 bits, and <literal>5679</literal> in the
         least significant 16 bits.  (To avoid confusion, this code
         must not be the same as any protocol version number.)
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>

   <varlistentry id="protocol-message-formats-StartupMessage">
    <term>StartupMessage (F)</term>
    <listitem>
     <variablelist>
      <varlistentry>
       <term>Int32</term>
       <listitem>
        <para>
         Length of message contents in bytes, including self.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>
       <term>Int32(196608)</term>
       <listitem>
        <para>
         The protocol version number.  The most significant 16 bits are
         the major version number (3 for the protocol described here).
         The least significant 16 bits are the minor version number
         (0 for the protocol described here).
        </para>
       </listitem>
      </varlistentry>
     </variablelist>

     <para>
      The protocol version number is followed by one or more pairs of
      parameter name and value strings.  A zero byte is required as a
      terminator after the last name/value pair.
      Parameters can appear in any
      order.  <literal>user</literal> is required, others are optional.
      Each parameter is specified as:
     </para>

     <variablelist>
      <varlistentry>
       <term>String</term>
       <listitem>
        <para>
         The parameter name.  Currently recognized names are:

         <variablelist>
          <varlistentry>
           <term><literal>user</literal></term>
           <listitem>
            <para>
             The database user name to connect as.  Required;
             there is no default.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term><literal>database</literal></term>
           <listitem>
            <para>
             The database to connect to.  Defaults to the user name.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term><literal>options</literal></term>
           <listitem>
            <para>
             Command-line arguments for the backend.  (This is
             deprecated in favor of setting individual run-time
             parameters.)  Spaces within this string are
             considered to separate arguments, unless escaped with
             a backslash (<literal>\</literal>); write <literal>\\</literal> to
             represent a literal backslash.
            </para>
           </listitem>
          </varlistentry>

          <varlistentry>
           <term><literal>replication</literal></term>
           <listitem>
            <para>
             Used to connect in streaming replication mode, where
             a small set of replication commands can be issued
             instead of SQL statements. Value can be
             <literal>true</literal>, <literal>false</literal>, or
             <literal>database</literal>, and the default is
             <literal>false</literal>. See
             <xref linkend="protocol-replication"/> for details.
            </para>
           </listitem>
          </varlistentry>
         </variablelist>

         In addition to the above, other parameters may be listed.
         Parameter names beginning with <literal>_pq_.</literal> are
         reserved for use as protocol extensions, while others are
         treated as run-time parameters to be set at backend start
         time.  Such settings will be applied during backend start
         (after parsing the command-line arguments if any) and will
         act as session defaults.
        </para>
       </listitem>
      </varlistentry>

      <varlistentry>

Title: PostgreSQL Startup Message Format
Summary
The StartupMessage format consists of a length field, a protocol version number, and one or more pairs of parameter name and value strings, with parameters including the required 'user' name, and optional 'database', 'options', and 'replication' settings, allowing for customization of the database connection and backend startup.