Re: psql --echo-queries does not echo all queries

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gavin Wahl <gavinwahl@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-10-25T14:32:41Z
Lists: pgsql-bugs
Gavin Wahl <gavinwahl@gmail.com> writes:
> The -e/--echo-queries psql option is documented to "Copy all SQL
> commands sent to the server to standard output as well." However, it
> does not show queries sent to the server by -1/--single-transaction or
> by ON_ERROR_ROLLBACK.

Did you try

  -E, --echo-hidden        display queries that internal commands generate

?

			regards, tom lane