]> granicus.if.org Git - postgresql/blobdiff - doc/src/sgml/protocol.sgml
Add pg_basebackup tool for streaming base backups
[postgresql] / doc / src / sgml / protocol.sgml
index 0818e053b6c6089f1c1054e920a5deec37d997c8..73f26b432da0943ecbc9477fce139f9f832acca3 100644 (file)
@@ -1,15 +1,20 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.56 2004/12/13 18:05:08 petere Exp $ -->
+<!-- doc/src/sgml/protocol.sgml -->
 
 <chapter id="protocol">
  <title>Frontend/Backend Protocol</title>
 
+ <indexterm zone="protocol">
+  <primary>protocol</primary>
+  <secondary>frontend-backend</secondary>
+ </indexterm>
+
  <para>
   <productname>PostgreSQL</productname> uses a message-based protocol
   for communication between frontends and backends (clients and servers).
   The protocol is supported over <acronym>TCP/IP</acronym> and also over
   Unix-domain sockets.  Port number 5432 has been registered with IANA as
   the customary TCP port number for servers supporting this protocol, but
-  in practice any non-privileged port number may be used.
+  in practice any non-privileged port number can be used.
  </para>
 
  <para>
   if it is able.
  </para>
 
- <para>
-  Higher level features built on this protocol (for example, how
-  <application>libpq</application> passes certain environment
-  variables when the connection is established) are covered elsewhere.
- </para>
-
   <para>
    In order to serve multiple clients efficiently, the server launches
    a new <quote>backend</> process for each client.
    count) before attempting to process its contents.  This allows easy
    recovery if an error is detected while processing the contents.  In
    extreme situations (such as not having enough memory to buffer the
-   message), the receiver may use the byte count to determine how much
+   message), the receiver can use the byte count to determine how much
    input to skip before it resumes reading messages.
   </para>
 
     into multiple steps.  The state retained between steps is represented
     by two types of objects: <firstterm>prepared statements</> and
     <firstterm>portals</>.  A prepared statement represents the result of
-    parsing, semantic analysis, and planning of a textual query string.  A
-    prepared statement is not necessarily ready to execute, because it may
+    parsing, semantic analysis, and (optionally) planning of a textual query
+    string.
+    A prepared statement is not necessarily ready to execute, because it might
     lack specific values for <firstterm>parameters</>.  A portal represents
     a ready-to-execute or already-partially-executed statement, with any
     missing parameter values filled in.  (For <command>SELECT</> statements,
     <firstterm>execute</> step that runs a portal's query.  In the case of
     a query that returns rows (<command>SELECT</>, <command>SHOW</>, etc),
     the execute step can be told to fetch only
-    a limited number of rows, so that multiple execute steps may be needed
+    a limited number of rows, so that multiple execute steps might be needed
     to complete the operation.
    </para>
 
     the only supported formats are <quote>text</> and <quote>binary</>,
     but the protocol makes provision for future extensions.  The desired
     format for any value is specified by a <firstterm>format code</>.
-    Clients may specify a format code for each transmitted parameter value
+    Clients can specify a format code for each transmitted parameter value
     and for each column of a query result.  Text has format code zero,
     binary has format code one, and all other format codes are reserved
     for future definition.
     Binary representations for integers use network byte order (most
     significant byte first).  For other data types consult the documentation
     or source code to learn about the binary representation.  Keep in mind
-    that binary representations for complex data types may change across
+    that binary representations for complex data types might change across
     server versions; the text format is usually the more portable choice.
    </para>
   </sect2>
   </para>
 
   <sect2>
-   <title>Start-Up</Title>
+   <title>Start-Up</title>
 
    <para>
     To begin a session, a frontend opens a connection to the server and sends
     The server then sends an appropriate authentication request message,
     to which the frontend must reply with an appropriate authentication
     response message (such as a password).
-    In principle the authentication request/response cycle could require
-    multiple iterations, but none of the present authentication methods
-    use more than one request and response.  In some methods, no response
+    For all authentication methods except GSSAPI and SSPI, there is at most
+    one request and one response. In some methods, no response
     at all is needed from the frontend, and so no authentication request
-    occurs.
+    occurs. For GSSAPI and SSPI, multiple exchanges of packets may be needed
+    to complete the authentication.
    </para>
 
    <para>
      </varlistentry>
 
      <varlistentry>
-      <term>AuthenticationKerberosV4</Term>
+      <term>AuthenticationKerberosV5</term>
       <listitem>
        <para>
-        The frontend must now take part in a Kerberos V4
+        The frontend must now take part in a Kerberos V5
         authentication dialog (not described here, part of the
         Kerberos specification) with the server.  If this is
         successful, the server responds with an AuthenticationOk,
      </varlistentry>
 
      <varlistentry>
-      <Term>AuthenticationKerberosV5</Term>
-      <ListItem>
-       <Para>
-        The frontend must now take part in a Kerberos V5
-        authentication dialog (not described here, part of the
-        Kerberos specification) with the server.  If this is
-        successful, the server responds with an AuthenticationOk,
-        otherwise it responds with an ErrorResponse.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>AuthenticationCleartextPassword</Term>
-      <ListItem>
-       <Para>
-        The frontend must now send a PasswordMessage containing the
-       password in clear-text form.  If
-        this is the correct password, the server responds with an
-        AuthenticationOk, otherwise it responds with an ErrorResponse.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>AuthenticationCryptPassword</Term>
-      <ListItem>
-       <Para>
+      <term>AuthenticationCleartextPassword</term>
+      <listitem>
+       <para>
         The frontend must now send a PasswordMessage containing the
-       password encrypted via crypt(3), using the 2-character salt
-       specified in the AuthenticationCryptPassword message.  If
+        password in clear-text form.  If
         this is the correct password, the server responds with an
         AuthenticationOk, otherwise it responds with an ErrorResponse.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>AuthenticationMD5Password</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>AuthenticationMD5Password</term>
+      <listitem>
+       <para>
         The frontend must now send a PasswordMessage containing the
-       password encrypted via MD5, using the 4-character salt
-       specified in the AuthenticationMD5Password message.  If
+        password encrypted via MD5, using the 4-character salt
+        specified in the AuthenticationMD5Password message.  If
         this is the correct password, the server responds with an
         AuthenticationOk, otherwise it responds with an ErrorResponse.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>AuthenticationSCMCredential</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>AuthenticationSCMCredential</term>
+      <listitem>
+       <para>
         This response is only possible for local Unix-domain connections
-       on platforms that support SCM credential messages.  The frontend
-       must issue an SCM credential message and then send a single data
-       byte.  (The contents of the data byte are uninteresting; it's
-       only used to ensure that the server waits long enough to receive
-       the credential message.)  If the credential is acceptable,
-       the server responds with an
+        on platforms that support SCM credential messages.  The frontend
+        must issue an SCM credential message and then send a single data
+        byte.  (The contents of the data byte are uninteresting; it's
+        only used to ensure that the server waits long enough to receive
+        the credential message.)  If the credential is acceptable,
+        the server responds with an
         AuthenticationOk, otherwise it responds with an ErrorResponse.
-       </Para>
-      </ListItem>
-     </VarListEntry>
+       </para>
+      </listitem>
+     </varlistentry>
 
-    </VariableList>
-   </Para>
+     <varlistentry>
+      <term>AuthenticationGSS</term>
+      <listitem>
+       <para>
+        The frontend must now initiate a GSSAPI negotiation. The frontend
+        will send a PasswordMessage with the first part of the GSSAPI
+        data stream in response to this. If further messages are needed,
+        the server will respond with AuthenticationGSSContinue.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>AuthenticationSSPI</term>
+      <listitem>
+       <para>
+        The frontend must now initiate a SSPI negotiation. The frontend
+        will send a PasswordMessage with the first part of the SSPI
+        data stream in response to this. If further messages are needed,
+        the server will respond with AuthenticationGSSContinue.
+       </para>
+      </listitem>
+
+     </varlistentry>
+     <varlistentry>
+      <term>AuthenticationGSSContinue</term>
+      <listitem>
+       <para>
+        This message contains the response data from the previous step
+        of GSSAPI or SSPI negotiation (AuthenticationGSS, AuthenticationSSPI
+        or a previous AuthenticationGSSContinue). If the GSSAPI
+        or SSPI data in this message
+        indicates more data is needed to complete the authentication,
+        the frontend must send that data as another PasswordMessage. If
+        GSSAPI or SSPI authentication is completed by this message, the server
+        will next send AuthenticationOk to indicate successful authentication
+        or ErrorResponse to indicate failure.
+       </para>
+      </listitem>
+     </varlistentry>
+
+    </variablelist>
+   </para>
 
    <para>
     If the frontend does not support the authentication method
    <para>
     The possible messages from the backend in this phase are:
 
-    <VariableList>
-     <VarListEntry>
-      <Term>BackendKeyData</Term>
-      <ListItem>
-       <Para>
+    <variablelist>
+     <varlistentry>
+      <term>BackendKeyData</term>
+      <listitem>
+       <para>
         This message provides secret-key data that the frontend must
         save if it wants to be able to issue cancel requests later.
         The frontend should not respond to this message, but should
         continue listening for a ReadyForQuery message.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>ParameterStatus</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>ParameterStatus</term>
+      <listitem>
+       <para>
         This message informs the frontend about the current (initial)
          setting of backend parameters, such as <xref
-          linkend="guc-client-encoding"> or <xref linkend="guc-datestyle">.
-         The frontend may ignore this message, or record the settings
+         linkend="guc-client-encoding"> or <xref linkend="guc-datestyle">.
+         The frontend can ignore this message, or record the settings
          for its future use; see <xref linkend="protocol-async"> for
          more details.  The frontend should not respond to this
          message, but should continue listening for a ReadyForQuery
          message.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>ReadyForQuery</Term>
-      <ListItem>
-       <Para>
-        Start-up is completed.  The frontend may now issue commands.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>ErrorResponse</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>ReadyForQuery</term>
+      <listitem>
+       <para>
+        Start-up is completed.  The frontend can now issue commands.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>ErrorResponse</term>
+      <listitem>
+       <para>
         Start-up failed.  The connection is closed after sending this
         message.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>NoticeResponse</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>NoticeResponse</term>
+      <listitem>
+       <para>
         A warning message has been issued.  The frontend should
         display the message but continue listening for ReadyForQuery
         or ErrorResponse.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-    </VariableList>
-   </Para>
+       </para>
+      </listitem>
+     </varlistentry>
+    </variablelist>
+   </para>
 
    <para>
     The ReadyForQuery message is the same one that the backend will
    </para>
   </sect2>
 
-  <Sect2>
-   <Title>Simple Query</Title>
+  <sect2>
+   <title>Simple Query</title>
 
-   <Para>
+   <para>
     A simple query cycle is initiated by the frontend sending a Query message
     to the backend.  The message includes an SQL command (or commands)
     expressed as a text string.
     The backend then sends one or more response
     messages depending on the contents of the query command string,
     and finally a ReadyForQuery response message.  ReadyForQuery
-    informs the frontend that it may safely send a new command.
+    informs the frontend that it can safely send a new command.
     (It is not actually necessary for the frontend to wait for
     ReadyForQuery before issuing another command, but the frontend must
     then take responsibility for figuring out what happens if the earlier
     command fails and already-issued later commands succeed.)
    </para>
 
-   <Para>
+   <para>
     The possible response messages from the backend are:
 
-    <VariableList>
-     <VarListEntry>
-      <Term>CommandComplete</Term>
-      <ListItem>
-       <Para>
+    <variablelist>
+     <varlistentry>
+      <term>CommandComplete</term>
+      <listitem>
+       <para>
         An SQL command completed normally.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>CopyInResponse</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>CopyInResponse</term>
+      <listitem>
+       <para>
         The backend is ready to copy data from the frontend to a
         table; see <xref linkend="protocol-copy">.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>CopyOutResponse</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>CopyOutResponse</term>
+      <listitem>
+       <para>
         The backend is ready to copy data from a table to the
         frontend; see <xref linkend="protocol-copy">.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>RowDescription</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>RowDescription</term>
+      <listitem>
+       <para>
         Indicates that rows are about to be returned in response to
-       a <command>SELECT</command>, <command>FETCH</command>, etc query.
-       The contents of this message describe the column layout of the rows.
-       This will be followed by a DataRow message for each row being returned
+        a <command>SELECT</command>, <command>FETCH</command>, etc query.
+        The contents of this message describe the column layout of the rows.
+        This will be followed by a DataRow message for each row being returned
         to the frontend.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>DataRow</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>DataRow</term>
+      <listitem>
+       <para>
         One of the set of rows returned by
-       a <command>SELECT</command>, <command>FETCH</command>, etc query.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>EmptyQueryResponse</Term>
-      <ListItem>
-       <Para>
+        a <command>SELECT</command>, <command>FETCH</command>, etc query.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>EmptyQueryResponse</term>
+      <listitem>
+       <para>
         An empty query string was recognized.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>ErrorResponse</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>ErrorResponse</term>
+      <listitem>
+       <para>
         An error has occurred.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>ReadyForQuery</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>ReadyForQuery</term>
+      <listitem>
+       <para>
         Processing of the query string is complete.  A separate
-        message is sent to indicate this because the query string may
+        message is sent to indicate this because the query string might
         contain multiple SQL commands.  (CommandComplete marks the
         end of processing one SQL command, not the whole string.)
         ReadyForQuery will always be sent, whether processing
         terminates successfully or with an error.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>NoticeResponse</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>NoticeResponse</term>
+      <listitem>
+       <para>
         A warning message has been issued in relation to the query.
         Notices are in addition to other responses, i.e., the backend
         will continue processing the command.
-       </Para>
-      </ListItem>
-     </VarListEntry>
+       </para>
+      </listitem>
+     </varlistentry>
 
-    </VariableList>
-   </Para>
+    </variablelist>
+   </para>
 
-   <Para>
+   <para>
     The response to a <command>SELECT</> query (or other queries that
     return row sets, such as <command>EXPLAIN</> or <command>SHOW</>)
     normally consists of RowDescription, zero or more
     as described in <xref linkend="protocol-copy">.
     All other query types normally produce only
     a CommandComplete message.
-   </Para>
+   </para>
 
-   <Para>
+   <para>
     Since a query string could contain several queries (separated by
     semicolons), there might be several such response sequences before the
     backend finishes processing the query string.  ReadyForQuery is issued
     when the entire string has been processed and the backend is ready to
     accept a new query string.
-   </Para>
+   </para>
 
-   <Para>
+   <para>
     If a completely empty (no contents other than whitespace) query string
     is received, the response is EmptyQueryResponse followed by ReadyForQuery.
-   </Para>
+   </para>
 
-   <Para>
+   <para>
     In the event of an error, ErrorResponse is issued followed by
     ReadyForQuery.  All further processing of the query string is aborted by
     ErrorResponse (even if more queries remained in it).  Note that this
-    may occur partway through the sequence of messages generated by an
+    might occur partway through the sequence of messages generated by an
     individual query.
-   </Para>
+   </para>
 
    <para>
     In simple Query mode, the format of retrieved values is always text,
     A frontend must be prepared to accept ErrorResponse and
     NoticeResponse messages whenever it is expecting any other type of
     message.  See also <xref linkend="protocol-async"> concerning messages
-    that the backend may generate due to outside events.
+    that the backend might generate due to outside events.
    </para>
 
    <para>
    </para>
   </sect2>
 
-  <Sect2>
-   <Title>Extended Query</Title>
+  <sect2 id="protocol-flow-ext-query">
+   <title>Extended Query</title>
 
    <para>
     The extended query protocol breaks down the above-described simple
     about data types of parameter placeholders, and the
     name of a destination prepared-statement object (an empty string
     selects the unnamed prepared statement).  The response is
-    either ParseComplete or ErrorResponse.  Parameter data types may be
+    either ParseComplete or ErrorResponse.  Parameter data types can be
     specified by OID; if not given, the parser attempts to infer the
     data types in the same way as it would do for untyped literal string
     constants.
    </para>
 
+   <note>
+    <para>
+     A parameter data type can be left unspecified by setting it to zero,
+     or by making the array of parameter type OIDs shorter than the
+     number of parameter symbols (<literal>$</><replaceable>n</>)
+     used in the query string.  Another special case is that a parameter's
+     type can be specified as <type>void</> (that is, the OID of the
+     <type>void</> pseudotype).  This is meant to allow parameter symbols
+     to be used for function parameters that are actually OUT parameters.
+     Ordinarily there is no context in which a <type>void</> parameter
+     could be used, but if such a parameter symbol appears in a function's
+     parameter list, it is effectively ignored.  For example, a function
+     call such as <literal>foo($1,$2,$3,$4)</> could match a function with
+     two IN and two OUT arguments, if <literal>$3</> and <literal>$4</>
+     are specified as having type <type>void</>.
+    </para>
+   </note>
+
    <note>
     <para>
      The query string contained in a Parse message cannot include more
     the values to use for any parameter placeholders present in the prepared
     statement.  The
     supplied parameter set must match those needed by the prepared statement.
+    (If you declared any <type>void</> parameters in the Parse message,
+    pass NULL values for them in the Bind message.)
     Bind also specifies the format to use for any data returned
     by the query; the format can be specified overall, or per-column.
     The response is either BindComplete or ErrorResponse.
 
    <para>
     Query planning for named prepared-statement objects occurs when the Parse
-    message is received. If a query will be repeatedly executed with
-    different parameters, it may be beneficial to send a single Parse message
+    message is processed. If a query will be repeatedly executed with
+    different parameters, it might be beneficial to send a single Parse message
     containing a parameterized query, followed by multiple Bind
     and Execute messages. This will avoid replanning the query on each
     execution.
    <para>
     The unnamed prepared statement is likewise planned during Parse processing
     if the Parse message defines no parameters.  But if there are parameters,
-    query planning is delayed until the first Bind message for the statement
-    is received. The planner will consider the actual values of the parameters
-    provided in the Bind message when planning the query.
+    query planning occurs every time Bind parameters are supplied.  This allows the
+    planner to make use of the actual values of the parameters provided by
+    each Bind message, rather than use generic estimates.
    </para>
 
    <note>
     <para>
-     Query plans generated from a parameterized query may be less
+     Query plans generated from a parameterized query might be less
      efficient than query plans generated from an equivalent query with actual
      parameter values substituted. The query planner cannot make decisions
      based on actual parameter values (for example, index selectivity) when
      planning a parameterized query assigned to a named prepared-statement
      object.  This possible penalty is avoided when using the unnamed
      statement, since it is not planned until actual parameter values are
-     available.
-    </para>
-
-    <para>
-     If a second or subsequent Bind referencing the unnamed prepared-statement
-     object is received without an intervening Parse, the query is
-     not replanned. The parameter values used in the first Bind message may
-     produce a query plan that is only efficient for a subset of possible
-     parameter values. To force replanning of the query for a fresh set of
-     parameters, send another Parse message to replace the unnamed
-     prepared-statement object. 
+     available.  The cost is that planning must occur afresh for each Bind,
+     even if the query stays the same.
     </para>
    </note>
 
    </note>
   </sect2>
 
-  <Sect2>
-   <Title>Function Call</Title>
+  <sect2>
+   <title>Function Call</title>
 
    <para>
     The Function Call sub-protocol allows the client to request a direct
     FunctionCall message to the backend.  The backend then sends one
     or more response messages depending on the results of the function
     call, and finally a ReadyForQuery response message.  ReadyForQuery
-    informs the frontend that it may safely send a new query or
+    informs the frontend that it can safely send a new query or
     function call.
    </para>
 
    <para>
     The possible response messages from the backend are:
 
-    <VariableList>
-     <VarListEntry>
-      <Term>ErrorResponse</Term>
-      <ListItem>
-       <Para>
+    <variablelist>
+     <varlistentry>
+      <term>ErrorResponse</term>
+      <listitem>
+       <para>
         An error has occurred.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>FunctionCallResponse</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>FunctionCallResponse</term>
+      <listitem>
+       <para>
         The function call was completed and returned the result given
-       in the message.
-       (Note that the Function Call protocol can only handle a single
-       scalar result, not a row type or set of results.)
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>ReadyForQuery</Term>
-      <ListItem>
-       <Para>
+        in the message.
+        (Note that the Function Call protocol can only handle a single
+        scalar result, not a row type or set of results.)
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>ReadyForQuery</term>
+      <listitem>
+       <para>
         Processing of the function call is complete.  ReadyForQuery
         will always be sent, whether processing terminates
         successfully or with an error.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-
-     <VarListEntry>
-      <Term>NoticeResponse</Term>
-      <ListItem>
-       <Para>
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
+      <term>NoticeResponse</term>
+      <listitem>
+       <para>
         A warning message has been issued in relation to the function
         call.  Notices are in addition to other responses, i.e., the
         backend will continue processing the command.
-       </Para>
-      </ListItem>
-     </VarListEntry>
-    </VariableList>
-   </Para>
+       </para>
+      </listitem>
+     </varlistentry>
+    </variablelist>
+   </para>
   </sect2>
 
   <sect2 id="protocol-copy">
 
    <para>
     In the event of a backend-detected error during copy-in mode (including
-    receipt of a CopyFail message), the backend will issue an ErrorResponse 
+    receipt of a CopyFail message), the backend will issue an ErrorResponse
     message.  If the <command>COPY</> command was issued via an extended-query
     message, the backend will now discard frontend messages until a Sync
     message is received, then it will issue ReadyForQuery and return to normal
    <para>
     In the event of a backend-detected error during copy-out mode,
     the backend will issue an ErrorResponse message and revert to normal
-    processing.  The frontend should treat receipt of ErrorResponse (or
-    indeed any message type other than CopyData or CopyDone) as terminating
-    the copy-out mode.
+    processing.  The frontend should treat receipt of ErrorResponse as
+    terminating the copy-out mode.
+   </para>
+
+   <para>
+    It is possible for NoticeResponse and ParameterStatus messages to be
+    interspersed between CopyData messages; frontends must handle these cases,
+    and should be prepared for other asynchronous message types as well (see
+    <xref linkend="protocol-async">).  Otherwise, any message type other than
+    CopyData or CopyDone may be treated as terminating copy-out mode.
+   </para>
+
+   <para>
+    There is another Copy-related mode called Copy-both, which allows
+    high-speed bulk data transfer to <emphasis>and</> from the server.
+    Copy-both mode is initiated when a backend in walsender mode
+    executes a <command>START_REPLICATION</command> statement.  The
+    backend sends a CopyBothResponse message to the frontend.  Both
+    the backend and the frontend may then send CopyData messages
+    until the connection is terminated.  See <xref
+    linkend="protocol-replication">.
    </para>
 
    <para>
-    The CopyInResponse and CopyOutResponse messages include fields that
-    inform the frontend of the number of columns per row and the format
-    codes being used for each column.  (As of the present implementation,
-    all columns in a given <command>COPY</> operation will use the same
-    format, but the message design does not assume this.)
+    The CopyInResponse, CopyOutResponse and CopyBothResponse messages
+    include fields that inform the frontend of the number of columns
+    per row and the format codes being used for each column.  (As of
+    the present implementation, all columns in a given <command>COPY</>
+    operation will use the same format, but the message design does not
+    assume this.)
    </para>
+
   </sect2>
 
   <sect2 id="protocol-async">
     this case is effectively synchronous &mdash; but it is also possible
     for parameter status changes to occur because the administrator
     changed a configuration file and then sent the
-    <systemitem>SIGHUP</systemitem> signal to the postmaster.  Also,
+    <systemitem>SIGHUP</systemitem> signal to the server.  Also,
     if a <command>SET</command> command is rolled back, an appropriate
     ParameterStatus message will be generated to report the current
     effective value.
     <literal>server_version</>,
     <literal>server_encoding</>,
     <literal>client_encoding</>,
+    <literal>application_name</>,
     <literal>is_superuser</>,
     <literal>session_authorization</>,
-    <literal>DateStyle</>, and
-    <literal>integer_datetimes</>.
-    (<literal>server_encoding</> and <literal>integer_datetimes</> were not
-    reported by releases before 8.0.)
+    <literal>DateStyle</>,
+    <literal>IntervalStyle</>,
+    <literal>TimeZone</>,
+    <literal>integer_datetimes</>, and
+    <literal>standard_conforming_strings</>.
+    (<literal>server_encoding</>, <literal>TimeZone</>, and
+    <literal>integer_datetimes</> were not reported by releases before 8.0;
+    <literal>standard_conforming_strings</> was not reported by releases
+    before 8.1;
+    <literal>IntervalStyle</> was not reported by releases before 8.4;
+    <literal>application_name</> was not reported by releases before 9.0.)
     Note that
     <literal>server_version</>,
     <literal>server_encoding</> and
     backend will send a NotificationResponse message (not to be
     confused with NoticeResponse!)  whenever a
     <command>NOTIFY</command> command is executed for the same
-    notification name.
+    channel name.
    </para>
 
    <note>
     <para>
      At present, NotificationResponse can only be sent outside a
      transaction, and thus it will not occur in the middle of a
-     command-response series, though it may occur just before ReadyForQuery.
+     command-response series, though it might occur just before ReadyForQuery.
      It is unwise to design frontend logic that assumes that, however.
      Good practice is to be able to accept NotificationResponse at any
      point in the protocol.
    </note>
   </sect2>
 
-  <Sect2>
-   <Title>Cancelling Requests in Progress</Title>
+  <sect2>
+   <title>Cancelling Requests in Progress</title>
 
-   <Para>
-    During the processing of a query, the frontend may request
+   <para>
+    During the processing of a query, the frontend might request
     cancellation of the query.  The cancel request is not sent
     directly on the open connection to the backend for reasons of
     implementation efficiency: we don't want to have the backend
     the normal case.
    </para>
 
-   <Para>
+   <para>
     To issue a cancel request, the frontend opens a new connection to
     the server and sends a CancelRequest message, rather than the
     StartupMessage message that would ordinarily be sent across a new
     the cancel request message.
    </para>
 
-   <Para>
+   <para>
     A CancelRequest message will be ignored unless it contains the
     same key data (PID and secret key) passed to the frontend during
     connection start-up.  If the request matches the PID and secret
     processing the query.)
    </para>
 
-   <Para>
-    The cancellation signal may or may not have any effect &mdash; for
+   <para>
+    The cancellation signal might or might not have any effect &mdash; for
     example, if it arrives after the backend has finished processing
     the query, then it will have no effect.  If the cancellation is
     effective, it results in the current command being terminated
     early with an error message.
    </para>
 
-   <Para>
+   <para>
     The upshot of all this is that for reasons of both security and
     efficiency, the frontend has no direct way to tell whether a
     cancel request has succeeded.  It must continue to wait for the
     succeeding.
    </para>
 
-   <Para>
+   <para>
     Since the cancel request is sent across a new connection to the
     server and not across the regular frontend/backend communication
     link, it is possible for the cancel request to be issued by any
     process, not just the frontend whose query is to be canceled.
-    This may have some benefits of flexibility in building
+    This might provide additional flexibility when building
     multiple-process applications.  It also introduces a security
     risk, in that unauthorized persons might try to cancel queries.
     The security risk is addressed by requiring a dynamically
    </para>
   </sect2>
 
-  <Sect2>
-   <Title>Termination</Title>
+  <sect2>
+   <title>Termination</title>
 
    <para>
     The normal, graceful termination procedure is that the frontend
 
    <para>
     In rare cases (such as an administrator-commanded database shutdown)
-    the backend may disconnect without any frontend request to do so.
+    the backend might disconnect without any frontend request to do so.
     In such cases the backend will attempt to send an error or notice message
     giving the reason for the disconnection before it closes the connection.
    </para>
     is being processed, the backend will probably finish the query
     before noticing the disconnection.  If the query is outside any
     transaction block (<command>BEGIN</> ... <command>COMMIT</>
-    sequence) then its results may be committed before the
+    sequence) then its results might be committed before the
     disconnection is recognized.
    </para>
   </sect2>
 
-  <Sect2>
-   <Title><acronym>SSL</acronym> Session Encryption</Title>
+  <sect2>
+   <title><acronym>SSL</acronym> Session Encryption</title>
 
-   <Para>
+   <para>
     If <productname>PostgreSQL</> was built with
     <acronym>SSL</acronym> support, frontend/backend communications
     can be encrypted using <acronym>SSL</acronym>.  This provides
     StartupMessage.  The server then responds with a single byte
     containing <literal>S</> or <literal>N</>, indicating that it is
     willing or unwilling to perform <acronym>SSL</acronym>,
-    respectively.  The frontend may close the connection at this point
+    respectively.  The frontend might close the connection at this point
     if it is dissatisfied with the response.  To continue after
     <literal>S</>, perform an <acronym>SSL</acronym> startup handshake
     (not described here, part of the <acronym>SSL</acronym>
     response to SSLRequest from the server.  This would only occur if
     the server predates the addition of <acronym>SSL</acronym> support
     to <productname>PostgreSQL</>.  In this case the connection must
-    be closed, but the frontend may choose to open a fresh connection
+    be closed, but the frontend might choose to open a fresh connection
     and proceed without requesting <acronym>SSL</acronym>.
    </para>
 
    <para>
-    An initial SSLRequest may also be used in a connection that is being
+    An initial SSLRequest can also be used in a connection that is being
     opened to send a CancelRequest message.
    </para>
 
    <para>
     While the protocol itself does not provide a way for the server to
-    force <acronym>SSL</acronym> encryption, the administrator may
+    force <acronym>SSL</acronym> encryption, the administrator can
     configure the server to reject unencrypted sessions as a byproduct
     of authentication checking.
    </para>
   </sect2>
  </sect1>
 
-<Sect1 id="protocol-message-types">
-<Title>Message Data Types</Title>
+<sect1 id="protocol-replication">
+<title>Streaming Replication Protocol</title>
 
-<Para>
-This section describes the base data types used in messages.
+<para>
+To initiate streaming replication, the frontend sends the
+<literal>replication</> parameter in the startup message. This tells the
+backend to go into walsender mode, wherein a small set of replication commands
+can be issued instead of SQL statements. Only the simple query protocol can be
+used in walsender mode.
+
+The commands accepted in walsender mode are:
+
+<variablelist>
+  <varlistentry>
+    <term>IDENTIFY_SYSTEM</term>
+    <listitem>
+     <para>
+      Requests the server to identify itself. Server replies with a result
+      set of a single row, containing two fields:
+     </para>
+
+     <para>
+      <variablelist>
+      <varlistentry>
+      <term>
+       systemid
+      </term>
+      <listitem>
+      <para>
+       The unique system identifier identifying the cluster. This
+       can be used to check that the base backup used to initialize the
+       standby came from the same cluster.
+      </para>
+      </listitem>
+      </varlistentry>
 
-<VariableList>
-
-<VarListEntry>
-<Term>
-        Int<Replaceable>n</Replaceable>(<Replaceable>i</Replaceable>)
-</Term>
-<ListItem>
-<Para>
-                An <Replaceable>n</Replaceable>-bit integer in network byte
-               order (most significant byte first).
-                If <Replaceable>i</Replaceable> is specified it
-                is the exact value that will appear, otherwise the value
-               is variable.  Eg. Int16, Int32(42).
-</Para>
-</ListItem>
-</VarListEntry>
-
-<VarListEntry>
-<Term>
-        Int<Replaceable>n</Replaceable>[<Replaceable>k</Replaceable>]
-</Term>
-<ListItem>
-<Para>
-               An array of <Replaceable>k</Replaceable>
-                <Replaceable>n</Replaceable>-bit integers, each in network
-               byte order.  The array length <Replaceable>k</Replaceable>
-               is always determined by an earlier field in the message.
-               Eg. Int16[M].
-</Para>
-</ListItem>
-</VarListEntry>
-
-<VarListEntry>
-<Term>
-        String(<Replaceable>s</Replaceable>)
-</Term>
-<ListItem>
-<Para>
-                A null-terminated string (C-style string).  There is no
-               specific length limitation on strings.
-                If <Replaceable>s</Replaceable> is specified it is the exact
-               value that will appear, otherwise the value is variable.
-                Eg. String, String("user").
-</Para>
-                
-<Note>
-<Para>
-<Emphasis>There is no predefined limit</Emphasis> on the length of a string
-that can be returned by the backend.  Good coding strategy for a frontend
-is to use an expandable buffer so that anything that fits in memory can be
-accepted.  If that's not feasible, read the full string and discard trailing
-characters that don't fit into your fixed-size buffer.
-</Para>
-</Note>
-</ListItem>
-</VarListEntry>
-
-<VarListEntry>
-<Term>
-        Byte<Replaceable>n</Replaceable>(<Replaceable>c</Replaceable>)
-</Term>
-<ListItem>
-<Para>
-                Exactly <Replaceable>n</Replaceable> bytes.  If the field
-               width <Replaceable>n</Replaceable> is not a constant, it is
-               always determinable from an earlier field in the message.
-                If <Replaceable>c</Replaceable> is specified it is the exact
-                value.  Eg. Byte2, Byte1('\n').
-</Para>
-</ListItem>
-</VarListEntry>
+      <varlistentry>
+      <term>
+       timeline
+      </term>
+      <listitem>
+      <para>
+       Current TimelineID. Also useful to check that the standby is
+       consistent with the master.
+      </para>
+      </listitem>
+      </varlistentry>
+      </variablelist>
+     </para>
+    </listitem>
+  </varlistentry>
+
+  <varlistentry>
+    <term>START_REPLICATION <replaceable>XXX</>/<replaceable>XXX</></term>
+    <listitem>
+     <para>
+      Instructs server to start streaming WAL, starting at
+      WAL position <replaceable>XXX</>/<replaceable>XXX</>.
+      The server can reply with an error, e.g. if the requested section of WAL
+      has already been recycled. On success, server responds with a
+      CopyBothResponse message, and then starts to stream WAL to the frontend.
+      WAL will continue to be streamed until the connection is broken;
+      no further commands will be accepted.
+     </para>
+
+     <para>
+      WAL data is sent as a series of CopyData messages.  (This allows
+      other information to be intermixed; in particular the server can send
+      an ErrorResponse message if it encounters a failure after beginning
+      to stream.)  The payload in each CopyData message follows this format:
+     </para>
+
+     <para>
+      <variablelist>
+      <varlistentry>
+      <term>
+          XLogData (B)
+      </term>
+      <listitem>
+      <para>
+      <variablelist>
+      <varlistentry>
+      <term>
+          Byte1('w')
+      </term>
+      <listitem>
+      <para>
+          Identifies the message as WAL data.
+      </para>
+      </listitem>
+      </varlistentry>
+      <varlistentry>
+      <term>
+          Byte8
+      </term>
+      <listitem>
+      <para>
+          The starting point of the WAL data in this message, given in
+          XLogRecPtr format.
+      </para>
+      </listitem>
+      </varlistentry>
+      <varlistentry>
+      <term>
+          Byte8
+      </term>
+      <listitem>
+      <para>
+          The current end of WAL on the server, given in
+          XLogRecPtr format.
+      </para>
+      </listitem>
+      </varlistentry>
+      <varlistentry>
+      <term>
+          Byte8
+      </term>
+      <listitem>
+      <para>
+          The server's system clock at the time of transmission,
+          given in TimestampTz format.
+      </para>
+      </listitem>
+      </varlistentry>
+      <varlistentry>
+      <term>
+          Byte<replaceable>n</replaceable>
+      </term>
+      <listitem>
+      <para>
+          A section of the WAL data stream.
+      </para>
+      </listitem>
+      </varlistentry>
+      </variablelist>
+      </para>
+      </listitem>
+      </varlistentry>
+      </variablelist>
+     </para>
+     <para>
+       A single WAL record is never split across two CopyData messages.
+       When a WAL record crosses a WAL page boundary, and is therefore
+       already split using continuation records, it can be split at the page
+       boundary. In other words, the first main WAL record and its
+       continuation records can be sent in different CopyData messages.
+     </para>
+     <para>
+       Note that all fields within the WAL data and the above-described header
+       will be in the sending server's native format.  Endianness, and the
+       format for the timestamp, are unpredictable unless the receiver has
+       verified that the sender's system identifier matches its own
+       <filename>pg_control</> contents.
+     </para>
+     <para>
+       If the WAL sender process is terminated normally (during postmaster
+       shutdown), it will send a CommandComplete message before exiting.
+       This might not happen during an abnormal shutdown, of course.
+     </para>
+    </listitem>
+  </varlistentry>
+
+  <varlistentry>
+    <term>BASE_BACKUP [<literal>LABEL</literal> <replaceable>'label'</replaceable>] [<literal>PROGRESS</literal>] [<literal>FAST</literal>]</term>
+    <listitem>
+     <para>
+      Instructs the server to start streaming a base backup.
+      The system will automatically be put in backup mode before the backup
+      is started, and taken out of it when the backup is complete. The
+      following options are accepted:
+      <variablelist>
+       <varlistentry>
+        <term><literal>LABEL</literal> <replaceable>'label'</replaceable></term>
+        <listitem>
+         <para>
+          Sets the label of the backup. If none is specified, a backup label
+          of <literal>base backup</literal> will be used. The quoting rules
+          for the label are the same as a standard SQL string with
+          <xref linkend="guc-standard-conforming-strings"> turned on.
+         </para>
+        </listitem>
+       </varlistentry>
+
+       <varlistentry>
+        <term><literal>PROGRESS</></term>
+        <listitem>
+         <para>
+          Request information required to generate a progress report. This will
+          send back an approximate size in the header of each tablespace, which
+          can be used to calculate how far along the stream is done. This is
+          calculated by enumerating all the file sizes once before the transfer
+          is even started, and may as such have a negative impact on the
+          performance - in particular it may take longer before the first data
+          is streamed. Since the database files can change during the backup,
+          the size is only approximate and may both grow and shrink between
+          the time of approximation and the sending of the actual files.
+         </para>
+        </listitem>
+       </varlistentry>
+
+       <varlistentry>
+        <term><literal>FAST</></term>
+        <listitem>
+         <para>
+          Request a fast checkpoint.
+         </para>
+        </listitem>
+       </varlistentry>
+      </variablelist>
+     </para>
+     <para>
+      When the backup is started, the server will first send a header in
+      ordinary result set format, followed by one or more CopyResponse
+      results, one for PGDATA and one for each additional tablespace other
+      than <literal>pg_default</> and <literal>pg_global</>. The data in
+      the CopyResponse results will be a tar format (using ustar00
+      extensions) dump of the tablespace contents.
+     </para>
+     <para>
+      The header is an ordinary resultset with one row for each tablespace.
+      The fields in this row are:
+      <variablelist>
+       <varlistentry>
+        <term>spcoid</term>
+        <listitem>
+         <para>
+          The oid of the tablespace, or <literal>NULL</> if it's the base
+          directory.
+         </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term>spclocation</term>
+        <listitem>
+         <para>
+          The full path of the tablespace directory, or <literal>NULL</>
+          if it's the base directory.
+         </para>
+        </listitem>
+       </varlistentry>
+       <varlistentry>
+        <term>size</term>
+        <listitem>
+         <para>
+          The approximate size of the tablespace, if progress report has
+          been requested; otherwise it's <literal>NULL</>.
+         </para>
+        </listitem>
+       </varlistentry>
+      </variablelist>
+     </para>
+     <para>
+      The tar archive for the data directory and each tablespace will contain
+      all files in the directories, regardless of whether they are
+      <productname>PostgreSQL</> files or other files added to the same
+      directory. The only excluded files are:
+      <itemizedlist spacing="compact" mark="bullet">
+       <listitem>
+        <para>
+         <filename>postmaster.pid</>
+        </para>
+       </listitem>
+       <listitem>
+        <para>
+         <filename>pg_xlog</> (including subdirectories)
+        </para>
+       </listitem>
+      </itemizedlist>
+      Owner, group and file mode are set if the underlying filesystem on
+      the server supports it.
+     </para>
+    </listitem>
+  </varlistentry>
+</variablelist>
+
+</para>
 
-</VariableList>
-</Para>
 </sect1>
 
-<Sect1 id="protocol-message-formats">
-<Title>Message Formats</Title>
+<sect1 id="protocol-message-types">
+<title>Message Data Types</title>
 
-<Para>
-This section describes the detailed format of each message.  Each is marked to
-indicate that it may be sent by a frontend (F), a backend (B), or both
-(F &amp; B).
-Notice that although each message includes a byte count at the beginning,
-the message format is defined so that the message end can be found without
-reference to the byte count.  This aids validity checking.  (The CopyData
+<para>
+This section describes the base data types used in messages.
+
+<variablelist>
+
+<varlistentry>
+<term>
+        Int<replaceable>n</replaceable>(<replaceable>i</replaceable>)
+</term>
+<listitem>
+<para>
+                An <replaceable>n</replaceable>-bit integer in network byte
+                order (most significant byte first).
+                If <replaceable>i</replaceable> is specified it
+                is the exact value that will appear, otherwise the value
+                is variable.  Eg. Int16, Int32(42).
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+        Int<replaceable>n</replaceable>[<replaceable>k</replaceable>]
+</term>
+<listitem>
+<para>
+                An array of <replaceable>k</replaceable>
+                <replaceable>n</replaceable>-bit integers, each in network
+                byte order.  The array length <replaceable>k</replaceable>
+                is always determined by an earlier field in the message.
+                Eg. Int16[M].
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+        String(<replaceable>s</replaceable>)
+</term>
+<listitem>
+<para>
+                A null-terminated string (C-style string).  There is no
+                specific length limitation on strings.
+                If <replaceable>s</replaceable> is specified it is the exact
+                value that will appear, otherwise the value is variable.
+                Eg. String, String("user").
+</para>
+
+<note>
+<para>
+<emphasis>There is no predefined limit</emphasis> on the length of a string
+that can be returned by the backend.  Good coding strategy for a frontend
+is to use an expandable buffer so that anything that fits in memory can be
+accepted.  If that's not feasible, read the full string and discard trailing
+characters that don't fit into your fixed-size buffer.
+</para>
+</note>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
+        Byte<replaceable>n</replaceable>(<replaceable>c</replaceable>)
+</term>
+<listitem>
+<para>
+                Exactly <replaceable>n</replaceable> bytes.  If the field
+                width <replaceable>n</replaceable> is not a constant, it is
+                always determinable from an earlier field in the message.
+                If <replaceable>c</replaceable> is specified it is the exact
+                value.  Eg. Byte2, Byte1('\n').
+</para>
+</listitem>
+</varlistentry>
+
+</variablelist>
+</para>
+</sect1>
+
+<sect1 id="protocol-message-formats">
+<title>Message Formats</title>
+
+<para>
+This section describes the detailed format of each message.  Each is marked to
+indicate that it can be sent by a frontend (F), a backend (B), or both
+(F &amp; B).
+Notice that although each message includes a byte count at the beginning,
+the message format is defined so that the message end can be found without
+reference to the byte count.  This aids validity checking.  (The CopyData
 message is an exception, because it forms part of a data stream; the contents
-of any individual CopyData message may not be interpretable on their own.)
+of any individual CopyData message cannot be interpretable on their own.)
 </para>
 
-<VariableList>
+<variablelist>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 AuthenticationOk (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('R')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as an authentication request.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(8)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(0)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies that the authentication was successful.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
-AuthenticationKerberosV4 (B)
-</Term>
-<ListItem>
-<Para>
-
-<VariableList>
-<VarListEntry>
-<Term>
-        Byte1('R')
-</Term>
-<ListItem>
-<Para>
-                Identifies the message as an authentication request.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Int32(8)
-</Term>
-<ListItem>
-<Para>
-                Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Int32(1)
-</Term>
-<ListItem>
-<Para>
-                Specifies that Kerberos V4 authentication is required.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 AuthenticationKerberosV5 (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('R')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as an authentication request.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(8)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(2)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies that Kerberos V5 authentication is required.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 AuthenticationCleartextPassword (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('R')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as an authentication request.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(8)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(3)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies that a clear-text password is required.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
-AuthenticationCryptPassword (B)
-</Term>
-<ListItem>
-<Para>
-
-<VariableList>
-<VarListEntry>
-<Term>
-        Byte1('R')
-</Term>
-<ListItem>
-<Para>
-                Identifies the message as an authentication request.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Int32(10)
-</Term>
-<ListItem>
-<Para>
-                Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Int32(4)
-</Term>
-<ListItem>
-<Para>
-                Specifies that a crypt()-encrypted password is required.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Byte2
-</Term>
-<ListItem>
-<Para>
-                The salt to use when encrypting the password.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 AuthenticationMD5Password (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('R')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as an authentication request.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(12)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(5)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies that an MD5-encrypted password is required.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Byte4
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The salt to use when encrypting the password.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 AuthenticationSCMCredential (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('R')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as an authentication request.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(8)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(6)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies that an SCM credentials message is required.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
+AuthenticationGSS (B)
+</term>
+<listitem>
+<para>
+
+<variablelist>
+<varlistentry>
+<term>
+        Byte1('R')
+</term>
+<listitem>
+<para>
+                Identifies the message as an authentication request.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int32(8)
+</term>
+<listitem>
+<para>
+                Length of message contents in bytes, including self.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int32(7)
+</term>
+<listitem>
+<para>
+                Specifies that GSSAPI authentication is required.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
+AuthenticationSSPI (B)
+</term>
+<listitem>
+<para>
+
+<variablelist>
+<varlistentry>
+<term>
+        Byte1('R')
+</term>
+<listitem>
+<para>
+                Identifies the message as an authentication request.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int32(8)
+</term>
+<listitem>
+<para>
+                Length of message contents in bytes, including self.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int32(9)
+</term>
+<listitem>
+<para>
+                Specifies that SSPI authentication is required.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+AuthenticationGSSContinue (B)
+</term>
+<listitem>
+<para>
 
-</Para>
-</ListItem>
-</VarListEntry>
+<variablelist>
+<varlistentry>
+<term>
+        Byte1('R')
+</term>
+<listitem>
+<para>
+                Identifies the message as an authentication request.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int32
+</term>
+<listitem>
+<para>
+                Length of message contents in bytes, including self.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int32(8)
+</term>
+<listitem>
+<para>
+                Specifies that this message contains GSSAPI or SSPI data.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Byte<replaceable>n</replaceable>
+</term>
+<listitem>
+<para>
+                GSSAPI or SSPI authentication data.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+
+<varlistentry>
+<term>
 BackendKeyData (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('K')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as cancellation key data.
                 The frontend must save these values if it wishes to be
                 able to issue CancelRequest messages later.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(12)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The process ID of this backend.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The secret key of this backend.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 Bind (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('B')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Bind command.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The name of the destination portal
-               (an empty string selects the unnamed portal).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                (an empty string selects the unnamed portal).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The name of the source prepared statement
-               (an empty string selects the unnamed prepared statement).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                (an empty string selects the unnamed prepared statement).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
-               The number of parameter format codes that follow
-               (denoted <replaceable>C</> below).
-               This can be zero to indicate that there are no parameters
-               or that the parameters all use the default format (text);
-               or one, in which case the specified format code is applied
-               to all parameters; or it can equal the actual number of
-               parameters.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+                The number of parameter format codes that follow
+                (denoted <replaceable>C</> below).
+                This can be zero to indicate that there are no parameters
+                or that the parameters all use the default format (text);
+                or one, in which case the specified format code is applied
+                to all parameters; or it can equal the actual number of
+                parameters.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16[<replaceable>C</>]
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The parameter format codes.  Each must presently be
-               zero (text) or one (binary).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                zero (text) or one (binary).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The number of parameter values that follow (possibly zero).
-               This must match the number of parameters needed by the query.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                This must match the number of parameters needed by the query.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         Next, the following pair of fields appear for each parameter:
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The length of the parameter value, in bytes (this count
-               does not include itself).  Can be zero.
-               As a special case, -1 indicates a NULL parameter value.
-               No value bytes follow in the NULL case.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Byte<Replaceable>n</Replaceable>
-</Term>
-<ListItem>
-<Para>
+                does not include itself).  Can be zero.
+                As a special case, -1 indicates a NULL parameter 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 parameter, in the format indicated by the
-               associated format code.
-                <Replaceable>n</Replaceable> is the above length.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                associated format code.
+                <replaceable>n</replaceable> is the above length.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         After the last parameter, the following fields appear:
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
-               The number of result-column format codes that follow
-               (denoted <replaceable>R</> below).
-               This can be zero to indicate that there are no result columns
-               or that the result columns should all use the default format
-               (text); 
-               or one, in which case the specified format code is applied
-               to all result columns (if any); or it can equal the actual
-               number of result columns of the query.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+                The number of result-column format codes that follow
+                (denoted <replaceable>R</> below).
+                This can be zero to indicate that there are no result columns
+                or that the result columns should all use the default format
+                (text);
+                or one, in which case the specified format code is applied
+                to all result columns (if any); or it can equal the actual
+                number of result columns of the query.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16[<replaceable>R</>]
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The result-column format codes.  Each must presently be
-               zero (text) or one (binary).
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+                zero (text) or one (binary).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 BindComplete (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('2')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Bind-complete indicator.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 CancelRequest (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int32(16)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(80877102)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The cancel request code.  The value is chosen to contain
                 <literal>1234</> in the most significant 16 bits, and <literal>5678</> in the
                 least 16 significant bits.  (To avoid confusion, this code
                 must not be the same as any protocol version number.)
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The process ID of the target backend.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The secret key for the target backend.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 Close (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('C')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Close command.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Byte1
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 '<literal>S</>' to close a prepared statement; or
                 '<literal>P</>' to close a portal.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The name of the prepared statement or portal to close
-               (an empty string selects the unnamed prepared statement
-               or portal).
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+                (an empty string selects the unnamed prepared statement
+                or portal).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 CloseComplete (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('3')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Close-complete indicator.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 CommandComplete (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('C')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a command-completed response.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+       <para>
         The command tag.  This is usually a single
         word that identifies which SQL command was completed.
-       </Para>
+       </para>
 
-       <Para>
+       <para>
         For an <command>INSERT</command> command, the tag is
         <literal>INSERT <replaceable>oid</replaceable>
         <replaceable>rows</replaceable></literal>, where
         <replaceable>rows</replaceable> is the number of rows
         inserted. <replaceable>oid</replaceable> is the object ID
-        of the inserted row if <Replaceable>rows</Replaceable> is 1
-       and the target table has OIDs;
-       otherwise <Replaceable>oid</Replaceable> is 0.
-       </Para>
+        of the inserted row if <replaceable>rows</replaceable> is 1
+        and the target table has OIDs;
+        otherwise <replaceable>oid</replaceable> is 0.
+       </para>
 
-       <Para>
+       <para>
         For a <command>DELETE</command> command, the tag is
-       <literal>DELETE <Replaceable>rows</Replaceable></literal> where
-        <Replaceable>rows</Replaceable> is the number of rows deleted.
-       </Para>
+        <literal>DELETE <replaceable>rows</replaceable></literal> where
+        <replaceable>rows</replaceable> is the number of rows deleted.
+       </para>
 
-       <Para>
+       <para>
         For an <command>UPDATE</command> command, the tag is
-       <literal>UPDATE <Replaceable>rows</Replaceable></literal> where
-        <Replaceable>rows</Replaceable> is the number of rows updated.
-       </Para>
+        <literal>UPDATE <replaceable>rows</replaceable></literal> where
+        <replaceable>rows</replaceable> is the number of rows updated.
+       </para>
+
+       <para>
+        For a <command>SELECT</command> or <command>CREATE TABLE AS</command>
+        command, the tag is <literal>SELECT <replaceable>rows</replaceable></literal>
+        where <replaceable>rows</replaceable> is the number of rows retrieved.
+       </para>
 
        <para>
         For a <command>MOVE</command> command, the tag is
@@ -2142,1890 +2525,1973 @@ CommandComplete (B)
         <literal>FETCH <replaceable>rows</replaceable></literal> where
         <replaceable>rows</replaceable> is the number of rows that
         have been retrieved from the cursor.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+       </para>
 
-</Para>
-</ListItem>
-</VarListEntry>
+       <para>
+        For a <command>COPY</command> command, the tag is
+        <literal>COPY <replaceable>rows</replaceable></literal> where
+        <replaceable>rows</replaceable> is the number of rows copied.
+        (Note: the row count appears only in
+        <productname>PostgreSQL</productname> 8.2 and later.)
+       </para>
+
+</listitem>
+</varlistentry>
+</variablelist>
 
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+
+<varlistentry>
+<term>
 CopyData (F &amp; B)
-</Term>
-<ListItem>
-<Para>
-<VariableList>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('d')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as <command>COPY</command> data.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Byte<Replaceable>n</Replaceable>
-</Term>
-<ListItem>
-<Para>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Byte<replaceable>n</replaceable>
+</term>
+<listitem>
+<para>
                 Data that forms part of a <command>COPY</command> data stream.  Messages sent
-               from the backend will always correspond to single data rows,
-               but messages sent by frontends may divide the data stream
-               arbitrarily.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+                from the backend will always correspond to single data rows,
+                but messages sent by frontends might divide the data stream
+                arbitrarily.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 CopyDone (F &amp; B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('c')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a <command>COPY</command>-complete indicator.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 CopyFail (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('f')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a <command>COPY</command>-failure indicator.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 An error message to report as the cause of failure.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 CopyInResponse (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('G')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Start Copy In response.
                 The frontend must now send copy-in data (if not
-               prepared to do so, send a CopyFail message).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                prepared to do so, send a CopyFail message).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int8
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 0 indicates the overall <command>COPY</command> format is textual (rows
-               separated by newlines, columns separated by separator
-               characters, etc).
-               1 indicates the overall copy format is binary (similar
-               to DataRow format).
-               See <xref linkend="sql-copy" endterm="sql-copy-title">
-               for more information.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                separated by newlines, columns separated by separator
+                characters, etc).
+                1 indicates the overall copy format is binary (similar
+                to DataRow format).
+                See <xref linkend="sql-copy">
+                for more information.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
-               The number of columns in the data to be copied
-               (denoted <replaceable>N</> below).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+                The number of columns in the data to be copied
+                (denoted <replaceable>N</> below).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16[<replaceable>N</>]
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The format codes to be used for each column.
-               Each must presently be zero (text) or one (binary).
-               All must be zero if the overall copy format is textual.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                Each must presently be zero (text) or one (binary).
+                All must be zero if the overall copy format is textual.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 CopyOutResponse (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('H')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Start Copy Out response.
                 This message will be followed by copy-out data.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int8
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 0 indicates the overall <command>COPY</command> format
                 is textual (rows separated by newlines, columns
                 separated by separator characters, etc). 1 indicates
                 the overall copy format is binary (similar to DataRow
-                format). See <xref linkend="sql-copy"
-                endterm="sql-copy-title"> for more information. 
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                format). See <xref linkend="sql-copy"> for more information.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
-               The number of columns in the data to be copied
-               (denoted <replaceable>N</> below).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+                The number of columns in the data to be copied
+                (denoted <replaceable>N</> below).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16[<replaceable>N</>]
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The format codes to be used for each column.
-               Each must presently be zero (text) or one (binary).
-               All must be zero if the overall copy format is textual.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                Each must presently be zero (text) or one (binary).
+                All must be zero if the overall copy format is textual.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</para>
+</listitem>
+</varlistentry>
 
-</Para>
-</ListItem>
-</VarListEntry>
 
+<varlistentry>
+<term>
+CopyBothResponse (B)
+</term>
+<listitem>
+<para>
 
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
+        Byte1('W')
+</term>
+<listitem>
+<para>
+                Identifies the message as a Start Copy Both response.
+                This message is used only for Streaming Replication.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int32
+</term>
+<listitem>
+<para>
+                Length of message contents in bytes, including self.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int8
+</term>
+<listitem>
+<para>
+                0 indicates the overall <command>COPY</command> format
+                is textual (rows separated by newlines, columns
+                separated by separator characters, etc). 1 indicates
+                the overall copy format is binary (similar to DataRow
+                format). See <xref linkend="sql-copy"> for more information.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int16
+</term>
+<listitem>
+<para>
+                The number of columns in the data to be copied
+                (denoted <replaceable>N</> below).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Int16[<replaceable>N</>]
+</term>
+<listitem>
+<para>
+                The format codes to be used for each column.
+                Each must presently be zero (text) or one (binary).
+                All must be zero if the overall copy format is textual.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 DataRow (B)
-</Term>
-<ListItem>
-<Para>
-<VariableList>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('D')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a data row.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The number of column values that follow (possibly zero).
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         Next, the following pair of fields appear for each column:
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The length of the column value, in bytes (this count
-               does not include itself).  Can 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>
+                does not include itself).  Can 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>
+                associated format code.
+                <replaceable>n</replaceable> is the above length.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 Describe (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('D')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Describe command.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Byte1
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 '<literal>S</>' to describe a prepared statement; or
                 '<literal>P</>' to describe a portal.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</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>
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+                (an empty string selects the unnamed prepared statement
+                or portal).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 EmptyQueryResponse (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('I')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a response to an empty query string.
-               (This substitutes for CommandComplete.)
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                (This substitutes for CommandComplete.)
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 ErrorResponse (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('E')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as an error.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         The message body consists of one or more identified fields,
-       followed by a zero byte as a terminator.  Fields may appear in
-       any order.  For each field there is the following:
-<VariableList>
-<VarListEntry>
-<Term>
+        followed by a zero byte as a terminator.  Fields can appear in
+        any order.  For each field there is the following:
+<variablelist>
+<varlistentry>
+<term>
         Byte1
-</Term>
-<ListItem>
-<Para>
+</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 may be added in future,
-               frontends should silently ignore fields of unrecognized
-               type.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                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>
+</term>
+<listitem>
+<para>
                 The field value.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 Execute (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('E')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as an Execute command.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The name of the portal to execute
-               (an empty string selects the unnamed portal).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                (an empty string selects the unnamed portal).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Maximum number of rows to return, if portal contains
-               a query that returns rows (ignored otherwise).  Zero
-               denotes <quote>no limit</>.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+                a query that returns rows (ignored otherwise).  Zero
+                denotes <quote>no limit</>.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 Flush (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('H')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Flush command.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 FunctionCall (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('F')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a function call.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies the object ID of the function to call.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
-               The number of argument format codes that follow
-               (denoted <replaceable>C</> below).
-               This can be zero to indicate that there are no arguments
-               or that the arguments all use the default format (text);
-               or one, in which case the specified format code is applied
-               to all arguments; or it can equal the actual number of
-               arguments.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+                The number of argument format codes that follow
+                (denoted <replaceable>C</> below).
+                This can be zero to indicate that there are no arguments
+                or that the arguments all use the default format (text);
+                or one, in which case the specified format code is applied
+                to all arguments; or it can equal the actual number of
+                arguments.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16[<replaceable>C</>]
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The argument format codes.  Each must presently be
-               zero (text) or one (binary).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                zero (text) or one (binary).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies the number of arguments being supplied to the
                 function.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         Next, the following pair of fields appear for each argument:
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The length of the argument value, in bytes (this count
-               does not include itself).  Can be zero.
-               As a special case, -1 indicates a NULL argument value.
-               No value bytes follow in the NULL case.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Byte<Replaceable>n</Replaceable>
-</Term>
-<ListItem>
-<Para>
+                does not include itself).  Can be zero.
+                As a special case, -1 indicates a NULL argument 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 argument, in the format indicated by the
-               associated format code.
-                <Replaceable>n</Replaceable> is the above length.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                associated format code.
+                <replaceable>n</replaceable> is the above length.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         After the last argument, the following field appears:
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The format code for the function result. Must presently be
-               zero (text) or one (binary).
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                zero (text) or one (binary).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 FunctionCallResponse (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('V')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a function call result.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The length of the function result value, in bytes (this count
-               does not include itself).  Can be zero.
-               As a special case, -1 indicates a NULL function result.
-               No value bytes follow in the NULL case.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
-        Byte<Replaceable>n</Replaceable>
-</Term>
-<ListItem>
-<Para>
+                does not include itself).  Can be zero.
+                As a special case, -1 indicates a NULL function result.
+                No value bytes follow in the NULL case.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
+        Byte<replaceable>n</replaceable>
+</term>
+<listitem>
+<para>
                 The value of the function result, in the format indicated by
-               the associated format code.
-                <Replaceable>n</Replaceable> is the above length.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                the associated format code.
+                <replaceable>n</replaceable> is the above length.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 NoData (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('n')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a no-data indicator.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 NoticeResponse (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('N')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a notice.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         The message body consists of one or more identified fields,
-       followed by a zero byte as a terminator.  Fields may appear in
-       any order.  For each field there is the following:
-<VariableList>
-<VarListEntry>
-<Term>
+        followed by a zero byte as a terminator.  Fields can appear in
+        any order.  For each field there is the following:
+<variablelist>
+<varlistentry>
+<term>
         Byte1
-</Term>
-<ListItem>
-<Para>
+</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 may be added in future,
-               frontends should silently ignore fields of unrecognized
-               type.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                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>
+</term>
+<listitem>
+<para>
                 The field value.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 NotificationResponse (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('A')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a notification response.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The process ID of the notifying backend process.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
-                The name of the condition that the notify has been raised on.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+                The name of the channel that the notify has been raised on.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
-                Additional information passed from the notifying process.
-               (Currently, this feature is unimplemented so the field
-               is always an empty string.)
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+                The <quote>payload</> string passed from the notifying process.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 ParameterDescription (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('t')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a parameter description.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The number of parameters used by the statement
-               (may be zero).
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                (can be zero).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         Then, for each parameter, there is the following:
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies the object ID of the parameter data type.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 ParameterStatus (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('S')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a run-time parameter status report.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The name of the run-time parameter being reported.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The current value of the parameter.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 Parse (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('P')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Parse command.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The name of the destination prepared statement
-               (an empty string selects the unnamed prepared statement).
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                (an empty string selects the unnamed prepared statement).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The query string to be parsed.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The number of parameter data types specified
-               (may be zero).  Note that this is not an indication of
-               the number of parameters that might appear in the
-               query string, only the number that the frontend wants to
-               prespecify types for.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                (can be zero).  Note that this is not an indication of
+                the number of parameters that might appear in the
+                query string, only the number that the frontend wants to
+                prespecify types for.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         Then, for each parameter, there is the following:
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Specifies the object ID of the parameter data type.
-               Placing a zero here is equivalent to leaving the type
-               unspecified.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+                Placing a zero here is equivalent to leaving the type
+                unspecified.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 ParseComplete (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('1')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Parse-complete indicator.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 PasswordMessage (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('p')
-</Term>
-<ListItem>
-<Para>
-                Identifies the message as a password response.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</term>
+<listitem>
+<para>
+                Identifies the message as a password response. Note that
+                this is also used for GSSAPI and SSPI response messages
+                (which is really a design error, since the contained data
+                is not a null-terminated string in that case, but can be
+                arbitrary binary data).
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The password (encrypted, if requested).
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 PortalSuspended (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('s')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a portal-suspended indicator.
-               Note this only appears if an Execute message's row-count limit
-               was reached.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                Note this only appears if an Execute message's row-count limit
+                was reached.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 Query (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('Q')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a simple query.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The query string itself.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 ReadyForQuery (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('Z')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message type.  ReadyForQuery is sent
                 whenever the backend is ready for a new query cycle.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(5)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Byte1
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Current backend transaction status indicator.
-               Possible values are '<literal>I</>' if idle (not in
-               a transaction block); '<literal>T</>' if in a transaction
-               block; or '<literal>E</>' if in a failed transaction
-               block (queries will be rejected until block is ended).
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
-
-</Para>
-</ListItem>
-</VarListEntry>
-
-
-<VarListEntry>
-<Term>
+                Possible values are '<literal>I</>' if idle (not in
+                a transaction block); '<literal>T</>' if in a transaction
+                block; or '<literal>E</>' if in a failed transaction
+                block (queries will be rejected until block is ended).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+
+</para>
+</listitem>
+</varlistentry>
+
+
+<varlistentry>
+<term>
 RowDescription (B)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('T')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a row description.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
-                Specifies the number of fields in a row (may be zero).
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</term>
+<listitem>
+<para>
+                Specifies the number of fields in a row (can be zero).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         Then, for each field, there is the following:
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The field name.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</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>
+                table, the object ID of the table; otherwise zero.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</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>
+                table, the attribute number of the column; otherwise zero.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The object ID of the field's data type.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The data type size (see <varname>pg_type.typlen</>).
-               Note that negative values denote variable-width types.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                Note that negative values denote variable-width types.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The type modifier (see <varname>pg_attribute.atttypmod</>).
-               The meaning of the modifier is type-specific.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                The meaning of the modifier is type-specific.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int16
-</Term>
-<ListItem>
-<Para>
+</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>
+                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>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 SSLRequest (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int32(8)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(80877103)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The <acronym>SSL</acronym> request code.  The value is chosen to contain
                 <literal>1234</> in the most significant 16 bits, and <literal>5679</> in the
                 least 16 significant bits.  (To avoid confusion, this code
                 must not be the same as any protocol version number.)
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 StartupMessage (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Int32
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(196608)
-</Term>
-<ListItem>
-<Para>
+</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>
+                The least significant 16 bits are the minor version number
+                (0 for the protocol described here).
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
         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</> is required, others are optional.
-       Each parameter is specified as:
-<VariableList>
-<VarListEntry>
-<Term>
+        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</> is required, others are optional.
+        Each parameter is specified as:
+<variablelist>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The parameter name.  Currently recognized names are:
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
                 <literal>user</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                         The database user name to connect as.  Required;
-                       there is no default.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                        there is no default.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
                 <literal>database</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                         The database to connect to.  Defaults to the user name.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
                 <literal>options</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                         Command-line arguments for the backend.  (This is
-                       deprecated in favor of setting individual run-time
-                       parameters.)
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+                        deprecated in favor of setting individual run-time
+                        parameters.)
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
                 In addition to the above, any run-time parameter that can be
-               set at backend start time may be listed.  Such settings
-               will be applied during backend start (after parsing the
-               command-line options if any).  The values will act as
-               session defaults.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+                set at backend start time might be listed.  Such settings
+                will be applied during backend start (after parsing the
+                command-line options if any).  The values will act as
+                session defaults.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         String
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 The parameter value.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 Sync (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('S')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a Sync command.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 Terminate (F)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
 
-<VariableList>
-<VarListEntry>
-<Term>
+<variablelist>
+<varlistentry>
+<term>
         Byte1('X')
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Identifies the message as a termination.
-</Para>
-</ListItem>
-</VarListEntry>
-<VarListEntry>
-<Term>
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>
         Int32(4)
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
                 Length of message contents in bytes, including self.
-</Para>
-</ListItem>
-</VarListEntry>
-</VariableList>
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
 
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
 
-</VariableList>
+</variablelist>
 
 </sect1>
 
 
-<Sect1 id="protocol-error-fields">
-<Title>Error and Notice Message Fields</Title>
+<sect1 id="protocol-error-fields">
+<title>Error and Notice Message Fields</title>
 
 <para>
-This section describes the fields that may appear in ErrorResponse and
+This section describes the fields that can appear in ErrorResponse and
 NoticeResponse messages.  Each field type has a single-byte identification
 token.  Note that any given field type should appear at most once per
 message.
 </para>
 
-<VariableList>
+<variablelist>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>S</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Severity: the field contents are
         <literal>ERROR</>, <literal>FATAL</>, or
         <literal>PANIC</> (in an error message), or
-       <literal>WARNING</>, <literal>NOTICE</>, <literal>DEBUG</>,
-       <literal>INFO</>, or <literal>LOG</> (in a notice message),
-       or a localized translation of one of these.  Always present.
-</Para>
-</ListItem>
-</VarListEntry>
-
-<VarListEntry>
-<Term>
+        <literal>WARNING</>, <literal>NOTICE</>, <literal>DEBUG</>,
+        <literal>INFO</>, or <literal>LOG</> (in a notice message),
+        or a localized translation of one of these.  Always present.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
 <literal>C</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Code: the SQLSTATE code for the error (see <xref
-       linkend="errcodes-appendix">).  Not localizable.  Always present.
-</Para>
-</ListItem>
-</VarListEntry>
+        linkend="errcodes-appendix">).  Not localizable.  Always present.
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>M</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Message: the primary human-readable error message.
         This should be accurate but terse (typically one line).
         Always present.
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>D</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Detail: an optional secondary error message carrying more
-        detail about the problem.  May run to multiple lines.
-</Para>
-</ListItem>
-</VarListEntry>
+        detail about the problem.  Might run to multiple lines.
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>H</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Hint: an optional suggestion what to do about the problem.
-       This is intended to differ from Detail in that it offers advice
-       (potentially inappropriate) rather than hard facts.
-       May run to multiple lines.
-</Para>
-</ListItem>
-</VarListEntry>
-
-<VarListEntry>
-<Term>
+        This is intended to differ from Detail in that it offers advice
+        (potentially inappropriate) rather than hard facts.
+        Might run to multiple lines.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
 <literal>P</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Position: the field value is a decimal ASCII integer, indicating
-       an error cursor position as an index into the original query string.
-       The first character has index 1, and positions are measured in
-       characters not bytes.
-</Para>
-</ListItem>
-</VarListEntry>
-
-<VarListEntry>
-<Term>
+        an error cursor position as an index into the original query string.
+        The first character has index 1, and positions are measured in
+        characters not bytes.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term>
 <literal>p</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Internal position: this is defined the same as the <literal>P</>
         field, but it is used when the cursor position refers to an internally
         generated command rather than the one submitted by the client.
         The <literal>q</> field will always appear when this field appears.
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>q</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Internal query: the text of a failed internally-generated command.
         This could be, for example, a SQL query issued by a PL/pgSQL function.
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>W</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Where: an indication of the context in which the error occurred.
         Presently this includes a call stack traceback of active
         procedural language functions and internally-generated queries.
         The trace is one entry per line, most recent first.
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>F</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         File: the file name of the source-code location where the error
-       was reported.
-</Para>
-</ListItem>
-</VarListEntry>
+        was reported.
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>L</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Line: the line number of the source-code location where the error
-       was reported.
-</Para>
-</ListItem>
-</VarListEntry>
+        was reported.
+</para>
+</listitem>
+</varlistentry>
 
-<VarListEntry>
-<Term>
+<varlistentry>
+<term>
 <literal>R</>
-</Term>
-<ListItem>
-<Para>
+</term>
+<listitem>
+<para>
         Routine: the name of the source-code routine reporting the error.
-</Para>
-</ListItem>
-</VarListEntry>
+</para>
+</listitem>
+</varlistentry>
 
-</VariableList>
+</variablelist>
 
 <para>
 The client is responsible for formatting displayed information to meet its
@@ -4036,9 +4502,8 @@ not line breaks.
 
 </sect1>
 
-
-<Sect1 id="protocol-changes">
-<Title>Summary of Changes since Protocol 2.0</Title>
+<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
@@ -4062,7 +4527,7 @@ PasswordMessage now has a type byte.
 
 <para>
 ErrorResponse and NoticeResponse ('<literal>E</>' and '<literal>N</>')
-messages now contain multiple fields, from which the client code may
+messages now contain multiple fields, from which the client code can
 assemble an error message of the desired level of verbosity.  Note that
 individual fields will typically not end with a newline, whereas the single
 string sent in the older protocol always did.
@@ -4087,7 +4552,7 @@ message types Parse, Bind, Execute, Describe, Close, Flush, and Sync, and the
 backend message types ParseComplete, BindComplete, PortalSuspended,
 ParameterDescription, NoData, and CloseComplete.  Existing clients do not
 have to concern themselves with this sub-protocol, but making use of it
-may allow improvements in performance or functionality.
+might allow improvements in performance or functionality.
 </para>
 
 <para>
@@ -4130,7 +4595,7 @@ the backend.
 
 <para>
 The NotificationResponse ('<literal>A</>') message has an additional string
-field, which is presently empty but may someday carry additional data passed
+field, which can carry a <quote>payload</> string passed
 from the <command>NOTIFY</command> event sender.
 </para>
 
@@ -4141,5 +4606,4 @@ string parameter; this has been removed.
 
 </sect1>
 
-
-</Chapter>
+</chapter>