Re: psql --echo-queries does not echo all queries - Mailing list pgsql-bugs

From Gavin Wahl
Subject Re: psql --echo-queries does not echo all queries
Date
Msg-id CACPudh0VOsmkbYW2EdqmHt_ZoAVWCKiVhQZDYS=ZR5LSMrWCOA@mail.gmail.com
Whole thread Raw
In response to Re: psql --echo-queries does not echo all queries  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I tried with -E and it does echo the BEGIN/END used to implement
-1/--single-transaction, but not the SAVEPOINT queries for
ON_ERROR_ROLLBACK.  It looks like SendQuery is calling PQexec directly
instead of calling the PSQLexec wrapper function that does the
logging. I happened to notice that the queries emitted by \watch, nor
the BEGIN for autocommit, aren't logged by either option as well.

I think this may be a documentation bug as well? I would expect -e to
be a superset of -E:

 -E
 --echo-hidden
     Echo the actual queries generated by \d and other backslash commands.

 -e
 --echo-queries
     Copy *ALL* [emphasis mine] SQL commands sent to the server to
standard output as well



pgsql-bugs by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore
Next
From: Richard Guo
Date:
Subject: Re: [EXTERNAL]Re: BUG #19094: select statement on postgres 17 vs postgres 18 is returning different/duplicate results