OurBigBook
Helper that gives psql PostgreSQL shell on the default database (ourbigbook).
To select another database use the -d option: E.g. to use the ourbigbook_test database from OurBigBook Web run unit tests in PostgreSQL:
bin/psql -d ourbigbook_test
psql just forwards everything to the underlying psql command, so you can e.g. run a SQL script stored in a file with:
bin/psql <tmp.sql
or run an SQL query from CLI with:
bin/psql -c 'select * from "Id"'
web/bin/psql
#!/usr/bin/env bash
db=ourbigbook
args=()
while [ $# -gt 0 ]; do
  case "$1" in
    -d)
      db="$2"
      shift 2
      ;;
    *)
      args+=("$1")
      shift
      ;;
  esac
done
PGPASSWORD=a psql -U ourbigbook_user -h localhost "$db" "${args[@]}"

Ancestors

  1. OurBigBook Web PostgreSQL utils
  2. OurBigBook Web PostgreSQL
  3. OurBigBook Web development
  4. OurBigBook Web
  5. OurBigBook Project