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#![recursion_limit = "256"]
11
12//! PostgreSQL network ("wire") protocol.
13//!
14//! For brevity, we often refer to the protocol as "pgwire," hence the name of
15//! this module. Beware that this name is only commonly used in the CockroachDB
16//! and Materialize ecosystems. The PostgreSQL documentation, for example, uses
17//! the long-winded "Frontend/Backend Protocol" title instead.
18//!
19//! # Useful references
20//!
21//! * [PostgreSQL Frontend/Backend Protocol documentation](https://www.postgresql.org/docs/11/protocol.html)
22//! * [CockroachDB pgwire implementation](https://github.com/cockroachdb/cockroach/tree/master/pkg/sql/pgwire)
23//! * ["Postgres on the wire" PGCon talk](https://www.pgcon.org/2014/schedule/attachments/330_postgres-for-the-wire.pdf)
24
25#![warn(clippy::as_conversions)]
26
27mod codec;
28mod message;
29mod metrics;
30mod protocol;
31mod server;
32
33pub use metrics::MetricsConfig;
34pub use protocol::match_handshake;
35pub use server::{Config, Server};