Revision 11356
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/db.sh | ||
---|---|---|
252 | 252 |
|
253 | 253 |
use_pg |
254 | 254 |
log- 2 |
255 |
local PGHOST="$server"; export PGHOST
|
|
256 |
local PGUSER="$user"; export PGUSER
|
|
257 |
local PGPASSWORD="$password"; export PGPASSWORD
|
|
258 |
local PGDATABASE="$database"; export PGDATABASE
|
|
255 |
if test "$server"; then local PGHOST="$server"; export PGHOST; fi
|
|
256 |
if test "$user"; then local PGUSER="$user"; export PGUSER; fi
|
|
257 |
if test "$password"; then local PGPASSWORD="$password"; export PGPASSWORD;fi
|
|
258 |
if test "$database"; then local PGDATABASE="$database"; export PGDATABASE;fi
|
|
259 | 259 |
log+ 2 |
260 | 260 |
|
261 | 261 |
command "time" "$@" |
Also available in: Unified diff
bugfix: lib/sh/db.sh: pg_cmd(): only set PG* connection/login env vars when the corresponding var is non-empty. there are some situations in which these must be unset (in order to use the default value), and other situations when the var must be set to something (i.e. "") to avoid it being defaulted to a value in local.sh > connection vars.