37 releases

Uses new Rust 2024

0.7.17 Mar 30, 2026
0.7.15 Oct 8, 2025
0.7.13 Feb 2, 2025
0.7.12 Sep 16, 2024
0.1.0 Dec 26, 2016

#428 in Database interfaces

Download history 375767/week @ 2025-12-18 232744/week @ 2025-12-25 364925/week @ 2026-01-01 516006/week @ 2026-01-08 469873/week @ 2026-01-15 532185/week @ 2026-01-22 537654/week @ 2026-01-29 606334/week @ 2026-02-05 584523/week @ 2026-02-12 669107/week @ 2026-02-19 711517/week @ 2026-02-26 820885/week @ 2026-03-05 858807/week @ 2026-03-12 703311/week @ 2026-03-19 736763/week @ 2026-03-26 782211/week @ 2026-04-02

3,237,201 downloads per month
Used in 1,064 crates (523 directly)

MIT/Apache

540KB
12K 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

~6–14MB
~262K SLoC