#database #postgres #postgresql #sql

postgres-types

Conversions between Rust and Postgres values

8 releases

0.2.1 Apr 3, 2021
0.2.0 Dec 25, 2020
0.1.3 Oct 17, 2020
0.1.2 Jul 3, 2020
0.1.0-alpha.1 Oct 15, 2019

#164 in Database interfaces

Download history 6694/week @ 2020-12-23 7945/week @ 2020-12-30 12055/week @ 2021-01-06 13188/week @ 2021-01-13 14570/week @ 2021-01-20 15954/week @ 2021-01-27 16675/week @ 2021-02-03 15486/week @ 2021-02-10 15819/week @ 2021-02-17 15062/week @ 2021-02-24 15083/week @ 2021-03-03 14894/week @ 2021-03-10 16839/week @ 2021-03-17 16358/week @ 2021-03-24 15598/week @ 2021-03-31 14668/week @ 2021-04-07

64,984 downloads per month
Used in 134 crates (23 directly)

MIT/Apache

195KB
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
~65K SLoC