Project

General

Profile

« Previous | Next » 

Revision 11349

lib/sh/db.sh: added pg_as_root()

View differences:

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

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

  
265 268
fi # load new aliases
266 269
if self_being_included; then
267 270

  

Also available in: Unified diff