Skip to main content

Module postgres

Module postgres 

Source
Expand description

PostgreSQL wire protocol compatibility layer (Phase 3.1 PG parity).

Exposes a minimal subset of the PG v3 protocol so psql, JDBC drivers (pgjdbc), node-postgres, pgAdmin, DBeaver, and friends can connect to RedDB as if it were PostgreSQL.

§Scope (Phase 3.1)

  • Startup message negotiation (protocol version 3.0 / 196608).
  • Authentication: trust only (no password). Clients that send an actual password are accepted — the password is ignored.
  • Simple query protocol (Q frames): parse → execute → stream rows.
  • Extended query protocol (Parse / Bind / Describe / Execute).
  • Minimal row description using a small OID mapping table.
  • ReadyForQuery + Command­Complete + ErrorResponse framing.

Not in this phase (future 3.1.x):

  • SASL / SCRAM auth, TLS.
  • Function-call protocol.
  • COPY protocol.
  • NOTIFY / LISTEN.

Re-exports§

pub use protocol::BackendMessage;
pub use protocol::FrontendMessage;
pub use protocol::PgWireError;
pub use server::start_pg_wire_listener;
pub use server::PgWireConfig;
pub use types::value_to_pg_wire_bytes;
pub use types::PgOid;

Modules§

protocol
PostgreSQL v3 wire protocol message framing (Phase 3.1 PG parity).
server
PostgreSQL wire-protocol listener (Phase 3.1 PG parity).
types
PostgreSQL type OID mapping (Phase 3.1 PG parity).