I'd like to access an existing postgres database, which is on my local (mac) machine, from haskell.
I can see quite a few postgres packages on hackage. Which is likely to be the easiest for me to use?
SaltStack Config requires a PostgreSQL 9.6 database, but PostgreSQL 12.4 is recommended. The recommended version of PostgreSQL is included with the SaltStack Config installer. PostgreSQL is a third-party open source database that is required for SaltStack Config.
In PostgreSQL, use type varchar or text instead. Similarly, replace type number with numeric , or use some other numeric data type if there's a more appropriate one. Instead of packages, use schemas to organize your functions into groups. Since there are no packages, there are no package-level variables either.
pgAdmin. pgAdmin is the de facto GUI tool for PostgreSQL, and the first tool anyone would use for PostgreSQL. It supports all PostgreSQL operations and features while being free and open source. pgAdmin is used by both novice and seasoned DBAs and developers for database administration.
postgresql-simple, a binding to libpq, was just announced, and seems to have a nice feature set. I haven't used it myself (or indeed PostgreSQL from Haskell at all), but it seems to have community support, so I'd recommend it if you don't want to use a particular library on top (like HDBC or persistent).
The alternatives appear to be libpq (another binding to libpq), which postgre-simple is based on, and pgsql-simple (a direct implementation of the wire protocol in Haskell), which, going by the post, doesn't seem ready for prime-time yet, and is not on Hackage.
There is also a PostgreSQL driver for HDBC; the PostgreSQL backend for the persistent library (as used in Yesod) is based on it.
Opaleye is a higher-level alternative to postgresql-simple
. It uses postgresql-simple
under the hood but provides a typesafe and composable API.
http://hackage.haskell.org/package/opaleye
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With