#postgresql #sql

postgres-types

Conversions between Rust and Postgres values

13 releases

0.2.6 Aug 20, 2023
0.2.5 Mar 27, 2023
0.2.4 Aug 20, 2022
0.2.3 Apr 30, 2022
0.1.0-alpha.2 Nov 28, 2019

#1010 in Database interfaces

Download history 110590/week @ 2023-12-14 75606/week @ 2023-12-21 69228/week @ 2023-12-28 107092/week @ 2024-01-04 110008/week @ 2024-01-11 125725/week @ 2024-01-18 115721/week @ 2024-01-25 113512/week @ 2024-02-01 110968/week @ 2024-02-08 105105/week @ 2024-02-15 108738/week @ 2024-02-22 119512/week @ 2024-02-29 120639/week @ 2024-03-07 116899/week @ 2024-03-14 112789/week @ 2024-03-21 104141/week @ 2024-03-28

475,254 downloads per month
Used in 479 crates (87 directly)

MIT/Apache

230KB
5.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

~3–11MB
~187K SLoC