33 releases

0.7.13 Feb 2, 2025
0.7.12 Sep 16, 2024
0.7.11 Jul 22, 2024
0.7.10 Aug 25, 2023
0.1.0 Dec 26, 2016

#352 in Database interfaces

Download history 161775/week @ 2024-10-30 148575/week @ 2024-11-06 189997/week @ 2024-11-13 167336/week @ 2024-11-20 141284/week @ 2024-11-27 166027/week @ 2024-12-04 177262/week @ 2024-12-11 109167/week @ 2024-12-18 54075/week @ 2024-12-25 101546/week @ 2025-01-01 167888/week @ 2025-01-08 163512/week @ 2025-01-15 162884/week @ 2025-01-22 181832/week @ 2025-01-29 221709/week @ 2025-02-05 224579/week @ 2025-02-12

820,809 downloads per month
Used in 570 crates (255 directly)

MIT/Apache

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

~8–20MB
~276K SLoC