postgresql-typed

A PostgreSQL library with compile-time SQL type inference and optional HDBC backend

https://github.com/dylex/postgresql-typed

Version on this page:0.5.0
LTS Haskell 22.13:0.6.2.5
Stackage Nightly 2024-03-14:0.6.2.5
Latest on Hackage:0.6.2.5

See all snapshots postgresql-typed appears in

Automatically type-check SQL statements at compile time. Uses Template Haskell and the raw PostgreSQL protocol to describe SQL statements at compile time and provide appropriate type marshalling for both parameters and results. Allows not only syntax verification of your SQL but also full type safety between your SQL and Haskell. Supports many built-in PostgreSQL types already, including arrays and ranges, and can be easily extended in user code to support any other types.

Also includes an optional HDBC backend that, since it uses the raw PostgreSQL protocol, may be more efficient than the normal libpq backend in some cases (though provides no more type safety than HDBC-postgresql when used without templates).

Originally based on Chris Forno's templatepg library.