The HDBC-postgresql package

[Tags:bsd3, library]

[Skip to Readme]


Dependencies base, HDBC (>=1.0.0), mtl, parsec [details]
License LGPL
Copyright Copyright (c) 2005-2006 John Goerzen
Maintainer John Goerzen <>
Stability Alpha
Uploaded Sun Sep 24 19:15:00 UTC 2006 by IsaacJones
Distributions Debian:, NixOS:, Tumbleweed:
Downloads 6740 total (49 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for HDBC-postgresql

Readme for HDBC-postgresql-

Welcome to HDBC, Haskell Database Connectivity.

This package provides a database backend driver for PostgreSQL.

Please see HDBC itself for documentation on use.  If you don't already
have it, you can browse this documentation at

This package provides one function in module Database.HDBC.PostgreSQL:

{- | Connect to a PostgreSQL server.

See <> for the meaning
of the connection string. -}
connectPostgreSQL :: String -> IO Connection

An example would be:
dbh <- connectPostgreSQL "host=localhost dbname=testdb user=foo"


None known at this time.


Before installing this package, you'll need to have HDBC 0.99.0 or
above installed.  You can download HDBC from

You'll need either GHC 6.4.1 or above, or Hugs 2005xx or above.  If
you're using Hugs, you'll also need cpphs (see if you don't already have it).


The steps to install are:

1) Examine HDBC-postgresql.cabal and edit the include-dirs
   line to point to your local PostgreSQL installation.  If necessary,
   uncomment and edit the extra-lib-dirs line to point to your
   local PostgreSQL installation.

2) ghc --make -o setup Setup.lhs

3) ./setup configure

4) ./setup build

5) ./setup install   (as root)

If you're on Windows, you can omit the leading "./".


To use with hugs, you'll want to use hugs -98.

To use with GHC, you'll want to use:

 -package HDBC -package HDBC-postgresql

Or, with Cabal, use:

  Build-Depends: HDBC>=0.99.0, HDBC-postgresql

-- John Goerzen
   December 2005