18 releases

0.2.11 Oct 8, 2025
0.2.9 Feb 2, 2025
0.2.8 Sep 16, 2024
0.2.7 Jul 22, 2024
0.1.0-alpha.2 Nov 28, 2019

#2502 in Database interfaces

Download history 452003/week @ 2025-09-03 456006/week @ 2025-09-10 460208/week @ 2025-09-17 501381/week @ 2025-09-24 491793/week @ 2025-10-01 479837/week @ 2025-10-08 461144/week @ 2025-10-15 464943/week @ 2025-10-22 489121/week @ 2025-10-29 487380/week @ 2025-11-05 511618/week @ 2025-11-12 619318/week @ 2025-11-19 399956/week @ 2025-11-26 487792/week @ 2025-12-03 380311/week @ 2025-12-10

1,370,597 downloads per month
Used in 898 crates (153 directly)

MIT/Apache

240KB
5.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–6.5MB
~129K SLoC