BSD-3-Clause licensed by Grant Monroe, Leon P Smith, Joey Adams
Maintained by Oleg Grenrus
This version can be pinned in stack with:postgresql-libpq-,3089

Module documentation for

This is a binding to libpq: the C application programmer's interface to PostgreSQL. libpq is a set of library functions that allow client programs to pass queries to the PostgreSQL backend server and to receive the results of these queries.


There are technicallly two breaking changes in this release, but they shouldn’t affect anyone not doing anything weird.

  • Binary parameters are passed without copying.
  • FFI functions are imported without unsafe. Most uses were incorrect. We make all calls “safe”, as checking whether libpq functions do IO or may call a notifier (potentially calling back into Haskell), is virtually impossible for all versions of libpq. (The above properties are not specified in the documentation).

  • Support bytestring-0.11
  • Allow Win32-
  • Make PQconsumeInput FFI call safe

  • Support GHC-8.6.1
  • Add simple smoke test