How to capture an interactive psql session in a log file? - Mailing list pgsql-general

From Gordon Shannon
Subject How to capture an interactive psql session in a log file?
Date
Msg-id 22862412.post@talk.nabble.com
Whole thread Raw
Responses Re: How to capture an interactive psql session in a log file?
Re: How to capture an interactive psql session in a log file?
List 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 by date:

Previous
From: itishree sukla
Date:
Subject: Re: Hello, i want to subscribe...
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: How to capture an interactive psql session in a log file?