Postgres uses a message-based protocol for communication between
frontends and backends. The protocol is implemented over TCP/IP and
also on Unix sockets. Postgres v6.3 introduced version numbers into
the protocol. This was done in such a way as to still allow
connections from earlier versions of frontends, but this document
does not cover the protocol used by those earlier versions.

This document describes the initial version-numbered protocol,
designated v1.0. Higher level features built on this protocol (for
example, how libpq passes certain
environment variables after the connection is established) are
covered elsewhere.