#database #postgres #postgresql #sql

postgres-types

Conversions between Rust and Postgres values

10 releases

0.2.3 Apr 30, 2022
0.2.2 Sep 29, 2021
0.2.1 Apr 3, 2021
0.2.0 Dec 25, 2020
0.1.0-alpha.2 Nov 28, 2019

#22 in Database interfaces

Download history 31963/week @ 2022-03-15 44972/week @ 2022-03-22 44751/week @ 2022-03-29 49663/week @ 2022-04-05 46842/week @ 2022-04-12 50327/week @ 2022-04-19 45984/week @ 2022-04-26 44806/week @ 2022-05-03 35867/week @ 2022-05-10 29214/week @ 2022-05-17 28703/week @ 2022-05-24 31318/week @ 2022-05-31 35452/week @ 2022-06-07 30789/week @ 2022-06-14 34912/week @ 2022-06-21 28047/week @ 2022-06-28

135,261 downloads per month
Used in 240 crates (35 directly)

MIT/Apache

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

~2.5MB
~76K SLoC