18 releases

Uses new Rust 2024

0.4.8 Mar 30, 2026
0.4.7 Sep 25, 2025
0.4.6 Sep 16, 2024
0.4.5 Aug 20, 2023
0.2.2 Nov 19, 2016

#92 in #test-suite

Download history 49550/week @ 2025-12-18 25290/week @ 2025-12-25 62336/week @ 2026-01-01 93529/week @ 2026-01-08 105503/week @ 2026-01-15 121415/week @ 2026-01-22 112538/week @ 2026-01-29 137380/week @ 2026-02-05 97195/week @ 2026-02-12 131727/week @ 2026-02-19 127577/week @ 2026-02-26 151599/week @ 2026-03-05 185811/week @ 2026-03-12 126553/week @ 2026-03-19 134510/week @ 2026-03-26 98457/week @ 2026-04-02

579,940 downloads per month
Used in 77 crates (3 directly)

MIT/Apache

33KB
810 lines

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

~125–490KB
~12K SLoC