Thread: Feature request psql

Feature request psql

From
Wim Bertels
Date:
Hallo,

i have a possible feature request.

It is not possible to get the sql statement itself and the output of the
statement in a user-friendly way to an output file (option \o psql),
this is only possible outside of psql, when calling this function with
an option -L (psql -L log.txt).
The nice thing about the option \o is that u can use multiple output
files with different markups in 1 script.

An example
with \o file1 option one can only get in file1
"
ECHO queries

SET

SET

    cid
    lid
    seq
   status
    lang
  payload
DM
SEL
           1
None
NL
inleiding
"

while having at the same time in logfile (option psql -L logfile)
"
********* QUERY **********
SET SESSION AUTHORIZATION  test;
**************************

SET
********* QUERY **********
SET search_path TO elswim;
**************************

SET
********* QUERY **********
SELECT    *
FROM    get_overview();
**************************

 cid |  lid   | seq | status | lang |                    payload
-----+--------+-----+--------+------+-----------------------------------------------
 DM  | SEL    |   1 | None   | NL   | inleiding
(1 row)
"

basically, the echo command doesnt get written to the file1 (of \o file1)

mvg,
Wim