Pavlo Golub wrote:
> > \set ECHO queries
> > would display them including immediately after \e in an interactive
> > session.
>
> Oh, great! That works! Thanks! But why ECHO all doesn't? Should all
> include queries by default?
As I understand, "ECHO all" does nothing when the commands are
read interactively. So in that mode it's the same as "ECHO none",
and it doesn't seem very useful indeed.
It appears to be an ancient decision, since it was already
described in the 7.1 docs pretty much like it is today:
https://www.postgresql.org/docs/7.1/app-psql.html
Maybe I'm missing the use case of neutralizing "ECHO all"
interactively, but otherwise I agree it would be more intuitive
and useful if it did the same thing in interactive and non-interactive
modes.
Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite