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
// Copyright Materialize, Inc. All rights reserved. // // Use of this software is governed by the Business Source License // included in the LICENSE file. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0. //! PostgreSQL network ("wire") protocol. //! //! For brevity, we often refer to the protocol as "pgwire," hence the name of //! this module. Beware that this name is only commonly used in the CockroachDB //! and Materialize ecosystems. The PostgreSQL documentation, for example, uses //! the long-winded "Frontend/Backend Protocol" title instead. //! //! # Useful references //! //! * [PostgreSQL Frontend/Backend Protocol documentation](https://www.postgresql.org/docs/11/protocol.html) //! * [CockroachDB pgwire implementation](https://github.com/cockroachdb/cockroach/tree/master/pkg/sql/pgwire) //! * ["Postgres on the wire" PGCon talk](https://www.pgcon.org/2014/schedule/attachments/330_postgres-for-the-wire.pdf) #![deny(clippy::as_conversions)] mod codec; mod message; mod protocol; mod server; pub use protocol::match_handshake; pub use server::{Config, Server, TlsConfig, TlsMode};