#database #postgres #postgresql #sql

postgres-types

Conversions between Rust and Postgres values

9 releases

0.2.2 Sep 29, 2021
0.2.1 Apr 3, 2021
0.2.0 Dec 25, 2020
0.1.3 Oct 17, 2020
0.1.0-alpha.2 Nov 28, 2019

#387 in Database interfaces

Download history 28078/week @ 2021-10-01 23002/week @ 2021-10-08 28220/week @ 2021-10-15 26083/week @ 2021-10-22 24181/week @ 2021-10-29 25482/week @ 2021-11-05 25850/week @ 2021-11-12 22509/week @ 2021-11-19 22094/week @ 2021-11-26 25748/week @ 2021-12-03 28082/week @ 2021-12-10 21295/week @ 2021-12-17 12496/week @ 2021-12-24 19808/week @ 2021-12-31 23979/week @ 2022-01-07 24747/week @ 2022-01-14

84,141 downloads per month
Used in 201 crates (28 directly)

MIT/Apache

200KB
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
~68K SLoC

Ta