External Publication
Visit Post

[ANN] hpgsql, a pure Haskell PostgreSQL driver (no libpq)

Haskell Community [Unofficial] May 13, 2026
Source

This is cool, thank you for creating this!

I have a question about the semantics. Is it always safe to reuse connection unless I got IrrecoverableHpgsqlError? The docs are not 100% clear, e.g. this:

It is possible Hpgsql throws a different kind of exception. File a bug report if that happens, and if you know it came from Hpgsql, treat it like a IrrecoverableHpgsqlError.

But most of the time I have no idea where the exception came from. And in withTransactionMode it looks like IrrecoverableHpgsqlError might get lost if async exception arrives between tryAny and throw, which (unless I’m misreading the code) will break the promise.

(Also these TODOs are suspicious)

Discussion in the ATmosphere

Loading comments...