Project

General

Profile

« Previous | Next » 

Revision 11357

lib/sh/db.sh: pg_as_root(): run sudo with echo_run to help debug

View differences:

lib/sh/db.sh
263 263
alias pg_cmd='"pg_cmd" "${FUNCNAME%%__*}"'
264 264

  
265 265
pg_as_root() # usage: pg_as_root {psql|pg_*} ... # only works inside runscript
266
{ echo_func; : "${wrap_fn?}"; sudo -E -u postgres "$wrap_fn" "$@"; }
266
{ echo_func; : "${wrap_fn?}"; echo_run sudo -E -u postgres "$wrap_fn" "$@"; }
267 267

  
268 268
fi # load new aliases
269 269
if self_being_included; then

Also available in: Unified diff