9 unstable releases

new 0.5.1 Feb 2, 2025
0.5.0 Dec 25, 2020
0.4.0 Oct 17, 2020
0.3.0 Dec 24, 2019
0.1.0 Nov 12, 2018

#765 in Database interfaces

Download history 20556/week @ 2024-10-18 24249/week @ 2024-10-25 25818/week @ 2024-11-01 23373/week @ 2024-11-08 26973/week @ 2024-11-15 23461/week @ 2024-11-22 22775/week @ 2024-11-29 24505/week @ 2024-12-06 23529/week @ 2024-12-13 13721/week @ 2024-12-20 10905/week @ 2024-12-27 18587/week @ 2025-01-03 25084/week @ 2025-01-10 23785/week @ 2025-01-17 27224/week @ 2025-01-24 23030/week @ 2025-01-31

102,995 downloads per month
Used in 53 crates (40 directly)

MIT/Apache

300KB
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

~8–19MB
~284K SLoC