# How to use PostgreSQL with Haskell. 8-9 library reviews

**URL:** <https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811>\
**Category:** Announcements\
**Created:** [October 6, 2023, 2:55pm UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811 "2023-10-06T14:55:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zelenya](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/zelenya/32/5565_2.png) [@Zelenya](https://discourse.haskell.org/u/Zelenya)\
**Post date:** [October 6, 2023, 2:55pm UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/1 "2023-10-06T14:55:36Z")

</div>

As of October 2023, there are around a dozen mature PostgreSQL libraries, all levels of abstractions, from low-level queries to the type level. More than enough for anybody.

Foreach library, we’ll talk about features, basics like writing queries, complexity, pitfalls, (everyone’s favorite topic) errors, and so on.

- [Tutorial in form of Video](https://www.youtube.com/watch?v=KCrCazaRHUA)
- [Tutorial in form of Text](https://dev.to/zelenya/how-to-use-postgresql-with-haskell-elephantine-library-review-2023-2836)
- [Repo](https://github.com/Zelenya/elephants)

---

<div class="post-metadata">

**Author:** ![lorenzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/lorenzo/32/1294_2.png) [@lorenzo](https://discourse.haskell.org/u/lorenzo)\
**Post date:** [October 6, 2023, 4:17pm UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/2 "2023-10-06T16:17:30Z")

</div>

Thanks for this great contribution to the community!

---

<div class="post-metadata">

**Author:** ![Lsmor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/lsmor/32/3302_2.png) [@Lsmor](https://discourse.haskell.org/u/Lsmor)\
**Post date:** [October 6, 2023, 4:58pm UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/3 "2023-10-06T16:58:44Z")

</div>

wow, this is an amazing job! congrats!

---

<div class="post-metadata">

**Author:** ![ocramz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ocramz/32/3713_2.png) [@ocramz](https://discourse.haskell.org/u/ocramz)\
**Post date:** [October 6, 2023, 5:05pm UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/4 "2023-10-06T17:05:35Z")

</div>

Great initiative ! 👏

---

<div class="post-metadata">

**Author:** ![ocharles](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/ocharles/32/102_2.png) [@ocharles](https://discourse.haskell.org/u/ocharles)\
**Post date:** [October 7, 2023, 7:43am UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/5 "2023-10-07T07:43:36Z")

</div>

Great work! As a rel8 author, I’m happy to see that everything you’ve written is what I would call canonical usage, and I think you for doing a good job in portraying how the library is intended to be used!

---

<div class="post-metadata">

**Author:** ![jhrcek](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jhrcek/32/319_2.png) [@jhrcek](https://discourse.haskell.org/u/jhrcek)\
**Post date:** [October 8, 2023, 11:59am UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/6 "2023-10-08T11:59:31Z")

</div>

This is really awesome resource!  
Thanks for taking the time and providing both runnable code examples as well as video explanations.

> [postgresql-simple] has a companion postgresql-simple-migration library which has been archived since 2021 …

We recently switched to a maintained fork of this library: [postgresql-migration: PostgreSQL Schema Migrations](https://hackage.haskell.org/package/postgresql-migration)

---

<div class="post-metadata">

**Author:** ![Zelenya](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/zelenya/32/5565_2.png) [@Zelenya](https://discourse.haskell.org/u/Zelenya)\
**Post date:** [October 8, 2023, 4:13pm UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/7 "2023-10-08T16:13:33Z")

</div>

Thanks, I didn’t know about it, I’ll add links to it

---

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [October 8, 2023, 7:58pm UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/8 "2023-10-08T19:58:00Z")

</div>

@ocharles, would you mind taking a look at [Opaleye and Rel8 left joins · Issue #1 · Zelenya/elephants · GitHub](https://github.com/Zelenya/elephants/issues/1)? I think the Opaleye and Rel8 left join examples need to be fixed, and if so we should probably try to improve the documentation …

---

<div class="post-metadata">

**Author:** ![kaelnor](https://avatars.discourse-cdn.com/v4/letter/k/48db29/32.png) [@kaelnor](https://discourse.haskell.org/u/kaelnor)\
**Post date:** [October 14, 2023, 12:12pm UTC](https://discourse.haskell.org/t/how-to-use-postgresql-with-haskell-8-9-library-reviews/7811/9 "2023-10-14T12:12:54Z")

</div>

Thanks a lot for your time spent on this !

I’m trying to build a small web project as an exercise. As I’m learning Haskell for the last 6 months, this kind of content is invaluable as you can get quickly lost in the myriad of ways to do things 😅

The content is clear, concise and really gives a great point of comparison for beginning to use those libraries.  
At least it helped me pick one ! 👍
