28 releases

Uses new Rust 2024

new 0.6.11 Mar 30, 2026
0.6.9 Sep 25, 2025
0.6.8 Feb 2, 2025
0.6.7 Jul 22, 2024
0.1.1 Nov 22, 2016

#486 in Database interfaces

Download history 474828/week @ 2025-12-12 343205/week @ 2025-12-19 252138/week @ 2025-12-26 448679/week @ 2026-01-02 540845/week @ 2026-01-09 497998/week @ 2026-01-16 556541/week @ 2026-01-23 584182/week @ 2026-01-30 652286/week @ 2026-02-06 615110/week @ 2026-02-13 697135/week @ 2026-02-20 758104/week @ 2026-02-27 886350/week @ 2026-03-06 864346/week @ 2026-03-13 734214/week @ 2026-03-20 803627/week @ 2026-03-27

3,433,984 downloads per month
Used in 1,226 crates (59 directly)

MIT/Apache

95KB
2.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

~3–5MB
~108K SLoC