Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solidsnack/pglite
A tiny script to manage ephemeral Postgres databases.
https://github.com/solidsnack/pglite
Last synced: 2 months ago
JSON representation
A tiny script to manage ephemeral Postgres databases.
- Host: GitHub
- URL: https://github.com/solidsnack/pglite
- Owner: solidsnack
- License: isc
- Created: 2016-09-28T05:55:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-05T05:50:43.000Z (over 6 years ago)
- Last Synced: 2024-08-04T04:05:47.844Z (6 months ago)
- Language: Shell
- Size: 61.5 KB
- Stars: 110
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - pglite - A tiny script to manage ephemeral Postgres databases. (Shell)
README
A tiny (~250 line) shell script that manages ephemeral Postgres databases.
```bash
# Creates a database in ./var if it does not exist and immediately connects.
./pglite
# Upon closing the SQL console, shuts down the database.# Creates a database in ./var if it does not exist.
./pglite setup# Opens a SQL console, ensuring the database is started (see `start` below).
./pglite connect
# Upon closing the SQL console, shuts down the database.# The start/stop/status family of commands are passed directly to pg_ctl.
./pglite start|stop|status# To remove your database and its configuration.
./pglite rm# To display your current database connection string.
./pglite url# Example of connecting with `psql`:
psql "$(./pglite url)"
```