| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sun, 18 Jan 2026 01:56:36 GMT
X-Served-By: cache-dfw-ktki8620095-DFW, cache-bom-vanm7210092-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768701397.607445,VS0,VE292
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
haskell-bee-pgmq: PostgreSQL/PGMQ broker implementation for haskell-bee
[Skip to Readme]
haskell-bee-pgmq: PostgreSQL/PGMQ broker implementation for haskell-bee
Please see the README on GitHub at https://github.com/garganscript/haskell-bee/blob/master/haskell-bee-pgmq/README.md
[Skip to Readme]
Downloads
- haskell-bee-pgmq-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0 |
|---|---|
| Dependencies | aeson (>=2.1 && <2.3), base (>=4.17.2.0 && <5), bytestring (>=0.11 && <0.13), containers (>=0.6.7 && <0.8), deepseq (>=1.0.0.0 && <1.7), haskell-bee (>=0.1.0.0 && <0.2), haskell-bee-pgmq, haskell-pgmq (>=0.1.0.0 && <0.2), mtl (>=2.2 && <2.4), postgresql-libpq (>=0.10 && <=0.11), postgresql-simple (>=0.6 && <0.8), safe (>=0.3 && <0.4), safe-exceptions (>=0.1.7 && <0.2), scientific (>=0.3.7.0 && <0.4), text (>=1.2 && <2.2), time (>=1.10 && <1.15), units (>=2.4 && <2.5), unix-time (>=0.4.11 && <0.5) [details] |
| License | AGPL-3.0-or-later |
| Author | Gargantext |
| Maintainer | gargantext@iscpif.fr |
| Uploaded | by cgenie at 2025-06-16T11:05:29Z |
| Category | Concurrency |
| Home page | https://gitlab.iscpif.fr/gargantext/haskell-bee |
| Distributions | |
| Executables | simple-worker |
| Downloads | 27 total (4 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs uploaded by user Build status unknown [no reports yet] |
Readme for haskell-bee-pgmq-0.1.0.0
[back to package description]haskell-bee-pgmq
PostgreSQL/PGMQ broker implementation for haskell-bee.
This package provides a PostgreSQL-backed message queue broker using PGMQ (PostgreSQL Message Queue).
Database initialization
Notice that upon broker initialization, this calls PGMQ.initialize
which tries very hard to create the pgmq schema for you.
If you also want to pre-create the database itself, with some given user, you can try something like this:
import Shelly qualified as SH
createDBIfNotExists :: Text -> Text -> IO ()
createDBIfNotExists connStr dbName = do
-- For the \gexec trick, see:
-- https://stackoverflow.com/questions/18389124/simulate-create-database-if-not-exists-for-postgresql
(_res, _ec) <- SH.shelly $ SH.silently $ SH.escaping False $ do
let sql = "\"SELECT 'CREATE DATABASE " <> dbName <> "' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = '" <> dbName <> "')\\gexec\""
result <- SH.run "echo" [sql, "|", "psql", "-d", "\"" <> connStr <> "\""]
(result,) <$> SH.lastExitCode
return ()