Expand description
PostgreSQL wire protocol message framing and parsing.
This module implements the PostgreSQL v3 wire protocol’s message format.
All structural fields (message tags, lengths, column counts, OIDs, format
codes) use BigEndian (network byte order), exactly per the PostgreSQL
specification. The data payloads inside DataRow and COPY messages use
LittleEndian (HyperBinary) – see crate::protocol::copy and crate::types.
§Message Format
┌─────────┬─────────────────┬─────────────────────────────┐
│ Tag (1) │ Length (4, BE) │ Payload (variable) │
└─────────┴─────────────────┴─────────────────────────────┘- Tag: 1-byte identifier (e.g.
b'Q'for Query,b'D'forDataRow). The startup message is the sole exception – it has no tag. - Length: 4-byte
BigEndianu32, includes itself but not the tag. - Payload: Tag-specific; see
frontendandbackendfor details.
§Sub-modules
Re-exports§
pub use backend::Message;