tmp-postgres: Start and stop a temporary postgres
tmp-postgres
provides functions creating a temporary postgres
instance.
By default it will create a temporary directory for the data, a random port for listening and a temporary directory for a UNIX domain socket.
Here is an example using the expection safe with
function:
with $ \db -> bracket (connectPostgreSQL (toConnectionString db)) close $ \conn -> execute_ conn "CREATE TABLE foo (id int)"
MacOS and Linux are support. Windows is not.
Requires PostgreSQL 9.3+
WARNING!!
Ubuntu's PostgreSQL installation does not put initdb
on the PATH
. We need to add it manually. The necessary binaries are in the /usr/lib/postgresql/VERSION/bin/
directory, and should be added to the PATH
echo "export PATH=$PATH:/usr/lib/postgresql/VERSION/bin/" >> /home/ubuntu/.bashrc
[Skip to Readme]
Modules
[Index] [Quick Jump]
Downloads
- tmp-postgres-1.0.0.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates