#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

#910 in Database interfaces

Download history 119829/week @ 2024-01-16 120589/week @ 2024-01-23 117166/week @ 2024-01-30 107505/week @ 2024-02-06 109887/week @ 2024-02-13 105466/week @ 2024-02-20 117947/week @ 2024-02-27 117531/week @ 2024-03-05 120984/week @ 2024-03-12 112236/week @ 2024-03-19 120794/week @ 2024-03-26 122119/week @ 2024-04-02 114411/week @ 2024-04-09 112981/week @ 2024-04-16 119318/week @ 2024-04-23 88126/week @ 2024-04-30

455,268 downloads per month
Used in 492 crates (89 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