gargoyle-postgresql: Manage PostgreSQL servers with gargoyle

[ bsd3, library, postgresql, program ] [ Propose Tags ] [ Report a vulnerability ]

This package provides tools for managing PostgreSQL servers that live in local folders and communicate via a Unix domain socket. It uses the gargoyle package in order to automatically initialize, spin up, and spin down such servers according to client demand.

The `gargoyle-psql` executable is such a client which will try to connect to a PostgreSQL server at a given location:

gargoyle-psql db
psql (9.5.6)
Type "help" for help.

postgres=#

Note that `gargoyle-psql` assumes that PostgreSQL executables such as psql are available on the PATH. A custom Gargoyle is required to use non-standard PostgreSQL installations.

The following is an example of using this package to run postgresql-simple actions using a local DB:

import Database.PostgreSQL.Simple
import Gargoyle
import Gargoyle.PostgreSQL

withDb :: String -> (Connection -> IO a) -> IO a
withDb dbPath a = withGargoyle defaultPostgres dbPath $ \dbUri -> a =<< connectPostgreSQL dbUri

Flags

Manual Flags

NameDescriptionDefault
enable-psql-testDisabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

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

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2.0.0, 0.2.0.1, 0.2.0.2 (info)
Change log ChangeLog.md
Dependencies base (>=4.12 && <4.20), bytestring (>=0.10 && <0.13), directory (>=1.3 && <1.4), gargoyle (>=0.1.1.0 && <0.2), gargoyle-postgresql, posix-escape (>=0.1 && <0.2), process (>=1.5 && <1.7), stringsearch (>=0.3 && <0.4), text (>=1.2 && <2.2), unix (>=2.7.2 && <2.9) [details]
Tested with ghc ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2
License BSD-3-Clause
Copyright Copyright (C) 2017 Obsidian Systems LLC
Author Obsidian Systems LLC
Maintainer maintainer@obsidian.systems
Revised Revision 2 made by abrar at 2024-05-28T20:29:22Z
Category PostgreSQL
Uploaded by abrar at 2022-07-01T13:37:56Z
Distributions NixOS:0.2.0.2
Reverse Dependencies 2 direct, 0 indirect [details]
Executables gargoyle-postgres-monitor, gargoyle-pg-run, gargoyle-psql
Downloads 1584 total (8 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]