lpsmith/postgresql-simple — pull request #66 by joeyadams (2013-06-05 03:31:45+00:00)
Title: Fix getNotification for Windows by using threadDelay

`getNotification` currently doesn't work on Windows, as `threadWaitRead` does not work on sockets on Windows. This is a very simple workaround: use threadDelay to try again every second.

---

By the way, installing postgresql-simple on Windows 8 32-bit is actually pretty easy:

* Use the graphical installer to install Postgres: http://www.postgresql.org/download/windows/

* Update your `PATH` so that `pg_config` is available from the command line.

- Type Win+Break, and hunt for the "Environment Variables..." button.

- Under "System variables" is Path. Add `C:\Program Files\PostgreSQL\9.2\bin` (or wherever pg_config ended up) to it. Note that paths are delimited by semicolon (`;`), not colon (`:`) like in Unix.

- Open Command Prompt and type `pg_config`, to verify that your change worked.

* From the Command Prompt (not cygwin; Git Bash might be okay), run:

cabal update
cabal install postgresql-simple

On my system, applications built on top of postgresql-simple depend on `c:\program files\postgresql\9.2\bin\LIBPQ.DLL` (according to [Dependency Walker][1]).

I ran into some missing `LIBPQ.DLL` errors, but they mysteriously went away after I built from Command Prompt instead of Git Bash.

[1]: http://dependencywalker.com/