Rust bindings for Postgres

Over the libpq C library

We provide a new set of bindings over Postgresql libpq C library, that focuses to be Rusty but stick to the original library as much as possible.

The main features that we want to support are:

  • tracing
  • collecting notice messages
  • query execution
  • pretty-printing results

The main repo is on Github, which hosts the corresponding crate doc too.

Example: catching PostgreSQL notices

A concise unit test that connects via environment variables, installs a notice processor to collect server notices, executes a DO block that emits two notices and a SELECT, prints the result to a file, and asserts on the response and collected notices:

[Read More]