#postgresql #sql

postgres-types

Conversions between Rust and Postgres values

14 releases

new 0.2.7 Jul 22, 2024
0.2.6 Aug 20, 2023
0.2.5 Mar 27, 2023
0.2.4 Aug 20, 2022
0.1.0-alpha.2 Nov 28, 2019

#1183 in Database interfaces

Download history 122119/week @ 2024-04-02 114411/week @ 2024-04-09 112981/week @ 2024-04-16 119318/week @ 2024-04-23 106880/week @ 2024-04-30 112733/week @ 2024-05-07 122243/week @ 2024-05-14 118665/week @ 2024-05-21 113080/week @ 2024-05-28 119068/week @ 2024-06-04 124560/week @ 2024-06-11 113840/week @ 2024-06-18 120760/week @ 2024-06-25 108376/week @ 2024-07-02 122746/week @ 2024-07-09 92567/week @ 2024-07-16

466,048 downloads per month
Used in 541 crates (104 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

~2.5–10MB
~117K SLoC