mz_pgwire/
lib.rs

1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
9
10//! PostgreSQL network ("wire") protocol.
11//!
12//! For brevity, we often refer to the protocol as "pgwire," hence the name of
13//! this module. Beware that this name is only commonly used in the CockroachDB
14//! and Materialize ecosystems. The PostgreSQL documentation, for example, uses
15//! the long-winded "Frontend/Backend Protocol" title instead.
16//!
17//! # Useful references
18//!
19//!   * [PostgreSQL Frontend/Backend Protocol documentation](https://www.postgresql.org/docs/11/protocol.html)
20//!   * [CockroachDB pgwire implementation](https://github.com/cockroachdb/cockroach/tree/master/pkg/sql/pgwire)
21//!   * ["Postgres on the wire" PGCon talk](https://www.pgcon.org/2014/schedule/attachments/330_postgres-for-the-wire.pdf)
22
23#![warn(clippy::as_conversions)]
24
25mod codec;
26mod message;
27mod metrics;
28mod protocol;
29mod server;
30
31pub use metrics::MetricsConfig;
32pub use protocol::match_handshake;
33pub use server::{Config, Server};