# Pqi: Making "libpq" a choice, not a requirement

**URL:** <https://discourse.haskell.org/t/pqi-making-libpq-a-choice-not-a-requirement/14285>\
**Category:** Announcements\
**Created:** [June 18, 2026, 9:48am UTC](https://discourse.haskell.org/t/pqi-making-libpq-a-choice-not-a-requirement/14285 "2026-06-18T09:48:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikita-volkov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/nikita-volkov/32/3387_2.png) [@nikita-volkov](https://discourse.haskell.org/u/nikita-volkov)\
**Post date:** [June 18, 2026, 9:48am UTC](https://discourse.haskell.org/t/pqi-making-libpq-a-choice-not-a-requirement/14285/1 "2026-06-18T09:48:32Z")

</div>

Today I’m releasing `pqi`. It makes `libpq` a choice rather than a hard dependency for PostgreSQL drivers: write against one interface, then swap a single dependency to pick your transport - battle-tested C, or an experimental pure-Haskell adapter. I’m already migrating “hasql” to it. Should be easy to migrate “postgresql-simple” too.

Here’s my blog post about it all: [pqi: Making "libpq" a Choice, Not a Requirement – Functional programming debugs you](https://nikita-volkov.github.io/pqi-making-libpq-a-choice/)

---

<div class="post-metadata">

**Author:** ![Axman6](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Axman6](https://discourse.haskell.org/u/Axman6)\
**Post date:** [June 29, 2026, 1:40am UTC](https://discourse.haskell.org/t/pqi-making-libpq-a-choice-not-a-requirement/14285/2 "2026-06-29T01:40:32Z")

</div>

This is great work, and seems like a really sensible way to implement things. I’ve always been a fan of your work Nikita, and seeing the thought you put into making things simple for users should be an example for others. I just wish I was working on something that needed Postgres these days, I used to love working with Hasql and would love to try out pGenie.
