How to capture an interactive psql session in a log file?

Поиск
Список
Период
Сортировка
От Gordon Shannon
Тема How to capture an interactive psql session in a log file?
Дата
Msg-id 22862412.post@talk.nabble.com
обсуждение исходный текст
Ответы Re: How to capture an interactive psql session in a log file?  (hubert depesz lubaczewski <depesz@depesz.com>)
Re: How to capture an interactive psql session in a log file?  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
What I'm trying to do doesn't seem like it should be that difficult or
unusual, but I can't seem to find the right combination of commands to make
it happen.  I want to have a log file that captures everything from an
interactive psql session.  Running 8.3.7 with bash shell on Linux.

If I use \o <file> or \o |tee <file, it doesn't capture my entered commands,
or any error text.

I can use some fancy bash to capture stderr in the file too, and then error
text goes there, but no matter what, neither the commands I enter nor the
psql prompt will be captured in the log file.

This is even when using -a, or \set ECHO all.  It's as if my entered
commands neither go to stdout or stderr.

Has anyone solved this issue before?

Thanks in advance
Gordon
--
View this message in context:
http://www.nabble.com/How-to-capture-an-interactive-psql-session-in-a-log-file--tp22862412p22862412.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: itishree sukla
Дата:
Сообщение: Re: Hello, i want to subscribe...
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: How to capture an interactive psql session in a log file?