Fix handling -D parameter
This commit is contained in:
parent
40ecc78570
commit
a33e0bfabc
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ id "$PG_USER" > /dev/null 2>&1
|
||||||
[ $( echo "$PG_DEFAULT_PORT"|grep -c -E '^[0-9]*$' ) -ne 1 ] && "UNKNOWN : Postgres default master TCP port must be an integer." && exit 3
|
[ $( echo "$PG_DEFAULT_PORT"|grep -c -E '^[0-9]*$' ) -ne 1 ] && "UNKNOWN : Postgres default master TCP port must be an integer." && exit 3
|
||||||
|
|
||||||
# If PG_DB is not provided with -D parameter, use PG_USER as default value
|
# If PG_DB is not provided with -D parameter, use PG_USER as default value
|
||||||
[ -z "$PB_DB" ] && PG_DB="$PG_USER"
|
[ -z "$PG_DB" ] && PG_DB="$PG_USER"
|
||||||
|
|
||||||
function psql_get () {
|
function psql_get () {
|
||||||
echo "$1"|su - $PG_USER -c "$PSQL_BIN -d "$PG_DB" -t -P format=unaligned"
|
echo "$1"|su - $PG_USER -c "$PSQL_BIN -d "$PG_DB" -t -P format=unaligned"
|
||||||
|
|
Loading…
Reference in a new issue