1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Postgres Frontend and Backend Protocol
//!
//! ## Messaging Overview
//!
//! All communication is through a stream of messages. The first byte of a message identifies the message type,
//! and the next four bytes specify the length of the rest of the message (this length count includes itself,
//! but not the message-type byte). The remaining contents of the message are determined by the message type.
//!
//! ```text
//! ┏━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━┓
//! ┃ Ty ┃ Length ┃ Body ┃
//! ┣━━━━╋━━━━━━━━━━━━━━━━━━━╋━━━━━━┫
//! ┃ u8 ┃ u32 ┃ [u8] ┃
//! ┣━━━━╋━━━━━━━━━━━━━━━━━━━╋━━━━━━┫
//! ┃ 43 ┃ 00 | 00 | 00 | 32 ┃ .. ┃
//! ┗━━━━┻━━━━━━━━━━━━━━━━━━━┻━━━━━━┛
//! ```
//!
//! For historical reasons, the very first message sent by the client (the startup message)
//! has no initial message-type byte.
//!
//! ## [`Format`][PgFormat] and Format Codes
//!
//! Data of a particular data type might be transmitted in any of several different formats.
//! As of PostgreSQL 7.4 the only supported formats are “text” and “binary”. Text has format
//! code zero, and Binary has format code one.
//!
//! Clients can specify a format code for each transmitted parameter value and for each column of a query result.
//!
//! See [`PgFormat`] for details.
//!
//! <https://www.postgresql.org/docs/17/protocol-overview.html>
pub use ;
pub use PgFormat;
pub use FrontendProtocol;
pub use ;
pub use ProtocolError;