It can be used to break out from restricted environments by running non-interactive system commands.
The --output argument pipes the data in an external command if prefixed by |.
--output
|
psql -o'|id>/tmp/foo'
Implementation of postgres/src/bin/psql/common.c
postgres/src/bin/psql/common.c