tmp-postgres alternatives and similar packages
Based on the "Web" category.
Alternatively, view tmp-postgres alternatives based on common mentions on social networks and blogs.
-
haskell-bitmex-rest
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
swagger-petstore
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
servant
Servat is a Haskell DSL for describing, serving, querying, mocking, documenting web applications and more! -
neuron
Future-proof note-taking and publishing based on Zettelkasten (superseded by Emanote: https://github.com/srid/emanote) -
tagsoup
Haskell library for parsing and extracting information from (possibly malformed) HTML/XML documents -
keera-hails-reactive-htmldom
Keera Hails: Haskell on Rails - Reactive Programming Framework for Interactive Haskell applications -
ghcjs-dom
Make Document Object Model (DOM) apps that run in any browser and natively using WebKitGtk
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of tmp-postgres or a related project?
README
tmp-postgres
tmp-postgres
provides functions for creating a temporary postgres
instance.
By default it will create a temporary data directory and
a temporary directory for a UNIX domain socket for postgres
to listen on.
Here is an example using the exception-safe 'with' function:
with $ \db -> bracket
(connectPostgreSQL (toConnectionString db))
close $
\conn -> execute_ conn "CREATE TABLE foo (id int)"
To extend or override the defaults use withConfig
(or startConfig
).
tmp-postgres
ultimately calls initdb
(optionally) , postgres
and
createdb
(optionally).
All of the command line, environment variables and configuration files that are generated by default for the respective executables can be extended.
In general tmp-postgres
is useful if you want a clean temporary
postgres
and do not want to worry about clashing with an existing
postgres instance (or needing to ensure postgres
is already running).
Here are some different use cases for tmp-postgres
and their respective
configurations:
- The default 'with' and 'start' functions can be used to make a sandboxed temporary database for testing.
- By disabling
initdb
one could run a temporary isolated postgres on a base backup to test a migration. - By using the 'stopPostgres' and 'withRestart' functions one can test backup strategies.
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
Installation
macOS
$ brew install postgres
$ stack install tmp-postgres
Ubuntu
Ubuntu's PostgreSQL installation does not put initdb
on the PATH. We need to add it manually.
$ sudo apt-get install postgresql-VERSION
$ echo "export PATH=$PATH:/usr/lib/postgresql/VERSION/bin/" >> /home/ubuntu/.bashrc
$ stack install tmp-postgres