psql > split > queries & output - Mailing list pgsql-general

From Wim Bertels
Subject psql > split > queries & output
Date
Msg-id 73c574f0b615a1bff6d6ce48f7ba520a7bd749d5.camel@ucll.be
Whole thread Raw
Responses Re: psql > split > queries & output  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: psql > split > queries & output  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-general
Hello,

psql shows (the queries and) the output,
there are for example the -L option and echo_queries option

is there a way to run psql so that:
* inside psql there are no surprises :) (ignore this line:)
* one pipe (or..) to a file which only contains the statements
(queries) history (and not the output)
* another pipe (or..) to a file which only contains the output (with or
without the statements) history

why? for example, 
to have easy access in a psql     demonstration to past commands
(history),
without the output cluttering or overwhelming everything, side by side
on the screen. (optionally with a third pane for the output)

there is also the /s option in psql,
but i guess the history is only written to file when psql is closed,
and is not accessible during the session (only in memory?),
otherwise this would also be an option
(not ctrl+r)

suggestions or alternatives while using the commandline?

-- 
mvg,
Wim 
--
https://coronalert.be


--
Always do right.  This will gratify some people and astonish the rest.
        -- Mark Twain




pgsql-general by date:

Previous
From: Michael Krüger
Date:
Subject: Re: Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path
Next
From: Aravindhan Krishnan
Date:
Subject: postgres-10 with FIPS