[Haskell-cafe] Handling Postgresql array types

Riaan info at rotnetix.com
Fri Dec 26 03:36:07 UTC 2014

This is a question about database query libraries.  I am trying to do some
analytics on a Postgresql database and up to now have been using
Database.HDBC for most of my querying.

One of the columns on the database is a two dimensional float8 array.  I
tried using Database.PostgreSQL.Simple but got stuck on this array as I
could not figure out how to extend the built in conversion functions to
cater for something like this.  So went back to HDBC.  But now my queries
are starting to get fairly long and I have been looking at libraries like
Persistent with Esqualeto, HaskellDB and Groundhog to make my queries a
little more composable and type safe.

However I have not been able to find any examples of any of these libraries
using postgres arrays and given my postgresql-simple experience I worried
that I might similarly be unable, because of my low level of haskell
ability, to extend the conversion functions.

So to my question.  Does anyone have experience with one of these libraries
in dealing with postgresql arrays and could someone perhaps send me a
simple example that I could use as a basis.  Failing that, can anyone
advise me on which of these libraries have the most haskell newbie (LYAH
trained, but still struggling with RWH) friendly approach to writing new
conversion functions?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141226/22d46262/attachment.html>

More information about the Haskell-Cafe mailing list