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

#95 in #test-suite

Download history 87022/week @ 2026-01-05 113828/week @ 2026-01-12 98576/week @ 2026-01-19 120899/week @ 2026-01-26 121422/week @ 2026-02-02 141679/week @ 2026-02-09 103443/week @ 2026-02-16 116456/week @ 2026-02-23 145498/week @ 2026-03-02 157160/week @ 2026-03-09 162988/week @ 2026-03-16 133711/week @ 2026-03-23 122341/week @ 2026-03-30 132476/week @ 2026-04-06 141519/week @ 2026-04-13 108714/week @ 2026-04-20

508,605 downloads per month
Used in 80 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

~115–475KB
~11K SLoC