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

From: Gordon Shannon <gordo169(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to capture an interactive psql session in a log file?
Date: 2009-04-03 05:55:10
Message-ID: 22862412.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2009-04-03 05:58:26 Re: How to capture an interactive psql session in a log file?
Previous Message itishree sukla 2009-04-03 05:10:39 Re: [GENERAL] Hello, i want to subscribe...