# Rel8 1.8 released!

**URL:** <https://discourse.haskell.org/t/rel8-1-8-released/14697>\
**Category:** Announcements\
**Created:** [September 16, 2026, 3:59pm UTC](https://discourse.haskell.org/t/rel8-1-8-released/14697 "2026-09-16T15:59:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TeofilC](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/teofilc/32/3987_2.png) [@TeofilC](https://discourse.haskell.org/u/TeofilC)\
**Post date:** [September 16, 2026, 3:59pm UTC](https://discourse.haskell.org/t/rel8-1-8-released/14697/1 "2026-09-16T15:59:54Z")

</div>

Hi folks!

We’re happy to announce the release of [Rel8 1.8](https://hackage.haskell.org/package/rel8-1.8.0.0)! 🥳 Rel8 is a Haskell library for interacting with PostgreSQL databases, built on top of the fantastic Opaleye library.

The main objectives of Rel8 are:

- Conciseness: Users using Rel8 should not need to write boiler-plate code. By using expressive types, we can provide sufficient information for the compiler to infer code whenever possible.
- Inferrable: Despite using a lot of type level magic, Rel8 aims to have excellent and predictable type inference.
- Familiar: writing Rel8 queries should feel like normal Haskell programming.

I would like to highlight the new TH deriving functionality. This has been a long time coming, and can give very significant compile-time improvements. In the wild, I have seen it reduce the time taken to compile a module by 80%. It doesn’t yet support all of the use-cases of `Generics` deriving and is somewhat experimental, so feedback is greatly appreciated!

If you encounter any issues please [let us know](https://github.com/circuithub/rel8/issues).

Here’s the full changelog for this release:

## Added

- Added `Rel8.TH.deriveRel8able` and `Rel8.TH.deriveRel8ables` for deriving `Rel8able` instances using `TemplateHaskell`.  
This can be significantly faster than using `Generics`. In testing, we have seen 80% reductions in build time!

- Expose all `rel8` internal modules from the `rel8-internal` package.

- Added new `Conflict` and `Index` types. `Conflict` represents a [`conflict_target`](https://www.postgresql.org/docs/current/sql-insert.html#SQL-ON-CONFLICT) in an `ON CONFLICT`. It can be either a named constraint (`ON CONSTRAINT`) or a an `Index`.

- Added `Index`. `Index` is a description of a unique index which PostgreSQL can use for _unique index inference_. This is an alternative to specifying an explicit named constraint in a `conflict_target`.

- Add `notElem` and `notElem1` to `Rel8.Array`

- Added preliminary support for PostgreSQL ranges.

- Support GHC-9.14 and `semialign >= 1.4`.

- Added `notElem` and `notElem1` to `Rel8.Array`.

- Added `DBType Aeson.Object` instance.

- Bumped a variety of bounds.

## Changed

- The `Upsert` type was changed. Previously it had the columns (`index`, `predicate`) of what is now the `Index` type baked into its record. It now instead has a single `conflict` column (of type `Conflict`, which can be either an `Index` or a named constraint).

- The `DoNothing` constructor of `OnConflict` was changed to also take an optional `Conflict` value. Even though `ON CONFLICT DO NOTHING` does not generally require a `conflict_target`, there are cases where it can be necessary, e.g., if you have table that has both deferrable and non-deferrable constraints.

- `rel8` now requires at least version `0.10.8.0` of `opaleye`

## Fixed

- `elem` and `elem1` now use `IS NOT DISTINCT FROM` semantics (matching `(==.)`) when the element type is nullable, so `null` is found in an array containing `null`. Previously they were implemented with the array containment operator `<@`, which never matches `null`.

- Fixed some issues around the truncation of long column names.

- Improved documentation.

---

<div class="post-metadata">

**Author:** ![jackdk](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jackdk](https://discourse.haskell.org/u/jackdk)\
**Post date:** [September 22, 2026, 12:34am UTC](https://discourse.haskell.org/t/rel8-1-8-released/14697/2 "2026-09-22T00:34:18Z")

</div>

`rel8` is my favourite Haskell DB library because it’s managed to avoid becoming a type labyrinth most of the time, but you still get a lot of power and safety. Congrats on the new release.

---

<div class="post-metadata">

**Author:** ![Ambrose](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ambrose/32/5672_2.png) [@Ambrose](https://discourse.haskell.org/u/Ambrose)\
**Post date:** [September 22, 2026, 7:42am UTC](https://discourse.haskell.org/t/rel8-1-8-released/14697/3 "2026-09-22T07:42:32Z")

</div>

esqueleto is somehow a type labyrinth but still dookie because it is just a DSL over `WriterT ByteString`
