pq-sys

Autogenerated Rust bindings for libpq

Building

This repository contains direct, one-to-one mappings to the C functions provided in libpq-fe.h and postgres_ext.h. This library expects that libpq be installed on the system.

The build script of crate will attempt to find the lib path of libpq using the following methods:

The build script instructs Cargo to link the library statically if the environmental variable LIB_PQ_STATIC is set. This can be useful, if targeting for a musl target. If pkg-config is being used, it's configuration options will apply.

For OSX 10.11 you can use brew to install postgresql and then set the environment variable as described below:

brew install openssl export PQ_LIB_DIR=`brew --prefix postgresql`/lib