Project

General

Profile

« Previous | Next » 

Revision 12737

lib/sh/db.sh: psql(): replaced `test "$verbose_ok" && can_log` with bool var $verbose_

View differences:

trunk/lib/sh/db.sh
275 275
{
276 276
	echo_func; kw_params stdin
277 277
	local verbose_ok="$(! isset SUDO_USER; exit2bool)"; echo_vars verbose_ok
278
	local verbose_="$(test "$verbose_ok" && can_log; exit2bool)"
279
		echo_vars verbose_
278 280
	
279
	if test "$verbose_ok" && can_log; then set -- --echo-all --echo-hidden "$@";fi
281
	if test "$verbose_"; then set -- --echo-all --echo-hidden "$@"; fi
280 282
	local redirs=("${redirs[@]}" '40<&0' "0<${stdin:-&20}" '41>&1')
281 283
	(
282 284
		# hide stack traces/DETAIL sections of error messages at verbosity <2
283 285
		if ! clog++ can_log; then echo '\set VERBOSITY terse'; fi
284
		if test "$verbose_ok" && can_log; then cat <<'EOF'
286
		if test "$verbose_"; then cat <<'EOF'
285 287
\timing on
286 288
SET client_min_messages = NOTICE;
287 289
EOF

Also available in: Unified diff