26 lines
477 B
Bash
26 lines
477 B
Bash
##### Aliases
|
|
db_envs=(
|
|
cadev
|
|
dcdev
|
|
gadev
|
|
ildev
|
|
indev
|
|
mddev
|
|
txdev
|
|
utdev
|
|
vadev
|
|
)
|
|
|
|
# Database Connection
|
|
for env in $db_envs ; do
|
|
eval "alias psql_$env='psql -d $env -p 5432 -U ${env}_owner'"
|
|
if (( $+commands[pgcli] )); then
|
|
eval "alias pg_${env}='pgcli -d $env -p 5432 -U ${env}_owner'"
|
|
fi
|
|
done
|
|
|
|
# List Databases
|
|
alias psql_l="psql -p 5432 -U greenfiling -l"
|
|
# Sign-In as limited super user.
|
|
alias psql_root="psql -d postgres -p 5432 -U greenfiling"
|