9 unstable releases

0.5.2 Sep 25, 2025
0.5.1 Feb 2, 2025
0.5.0 Dec 25, 2020
0.4.0 Oct 17, 2020
0.1.0 Nov 12, 2018

#1513 in Database interfaces

Download history 29014/week @ 2025-10-13 28144/week @ 2025-10-20 30610/week @ 2025-10-27 31740/week @ 2025-11-03 34379/week @ 2025-11-10 36946/week @ 2025-11-17 33276/week @ 2025-11-24 32808/week @ 2025-12-01 33781/week @ 2025-12-08 32907/week @ 2025-12-15 20099/week @ 2025-12-22 18081/week @ 2025-12-29 32062/week @ 2026-01-05 32840/week @ 2026-01-12 33976/week @ 2026-01-19 33239/week @ 2026-01-26

133,267 downloads per month
Used in 31 crates (20 directly)

MIT/Apache

305KB
6.5K SLoC

Rust-Postgres

PostgreSQL support for Rust.

postgres Latest Version

Documentation

A native, synchronous PostgreSQL client.

tokio-postgres Latest Version

Documentation

A native, asynchronous PostgreSQL client.

postgres-types Latest Version

Documentation

Conversions between Rust and Postgres types.

postgres-native-tls Latest Version

Documentation

TLS support for postgres and tokio-postgres via native-tls.

postgres-openssl Latest Version

Documentation

TLS support for postgres and tokio-postgres via openssl.

Running test suite

The test suite requires postgres to be running in the correct configuration. The easiest way to do this is with docker:

  1. Install docker and docker-compose.
    1. On ubuntu: sudo apt install docker.io docker-compose.
  2. Make sure your user has permissions for docker.
    1. On ubuntu: sudo usermod -aG docker $USER
  3. Change to top-level directory of rust-postgres repo.
  4. Run docker-compose up -d.
  5. Run cargo test.
  6. Run docker-compose stop.

Dependencies

~8–21MB
~259K SLoC