10 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

#2148 in Database interfaces

Download history 45854/week @ 2025-10-24 39723/week @ 2025-10-31 38814/week @ 2025-11-07 38559/week @ 2025-11-14 41152/week @ 2025-11-21 39827/week @ 2025-11-28 33941/week @ 2025-12-05 35536/week @ 2025-12-12 26101/week @ 2025-12-19 22294/week @ 2025-12-26 30788/week @ 2026-01-02 35894/week @ 2026-01-09 37868/week @ 2026-01-16 41687/week @ 2026-01-23 46787/week @ 2026-01-30 51391/week @ 2026-02-06

185,160 downloads per month
Used in 90 crates (59 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

~7–22MB
~296K SLoC