The FFI adapter for pqi,
backed by postgresql-libpq
(a binding to the C libpq library).
Pqi.Ffi.adapter produces Pqi.Connection values whose fields close over a
C-backed PGconn, each a near-mechanical delegation to the matching
Database.PostgreSQL.LibPQ function. The only work is converting between
this family’s portable types (OIDs as Word32, indices as Int32, the
shared enums) and postgresql-libpq’s C-specific newtypes.
This adapter is the fidelity reference for the pqi family: it is the
oracle against which all other adapters are tested. The
pqi-conformance suite
runs every operation on both the candidate adapter and this one, asserts
identical output, and thereby defines what “correct” means for the family.
Changes
v1.0.1.0
Non-breaking
Picked up pqi 1.1.0.0, which renamed Notify’s fields to notifyRelname/notifyBePid/notifyExtra to match postgresql-libpq
v1.0.0.1
Doc corrections.
v1.0.0.0
Non-breaking
Support for the resStatus field of Pqi.Adapter
v0.1.0.1
Fixes
Picked up pqi-conformance 0.1.0.1, which fixes a build break caused by extensions removed for GHC 8.10 compatibility
v0.1.0.0
Breaking
Migrate to pqi 0.1’s record-of-functions redesign and switch to exporting the adapter value instead of the Connection type.