GitHunt
CO

CodyReichert/pgdevdb

A bash script to quickly create a Postgres user and database for testing and development.

  • pgdevdb

Pgdevdb is a bash script that creates a postgres database and user
(with password) from one command. The purpose is to create
test postgres users and databases on the fly for quick testing and
development. To use it, clone the repo and add =pgdevdb.sh= to your path.

** Usage

Run =pgdevdb.sh= and the first argument will be the username, user password, and database name.

#+BEGIN_SRC bash
    λ pgdevdb mytestdb
#+END_SRC

To delete the =mytestdb= user and database we just created, run it with the =-d= flag.

#+BEGIN_SRC bash
    λ pgdevdb -d mytestdb
#+END_SRC

To login directly to the sql shell of =mytestdb=:

#+BEGIN_SRC bash
    λ pgdevdb -l mytestdb
#+END_SRC

Languages

Shell100.0%

Contributors

Created October 22, 2014
Updated October 4, 2025
CodyReichert/pgdevdb | GitHunt