Re: BUG #16034: `\set ECHO all` doesn't work for \e command - Mailing list pgsql-bugs

From Daniel Verite
Subject Re: BUG #16034: `\set ECHO all` doesn't work for \e command
Date
Msg-id 1c0128a5-0507-4e53-902e-f1a4596b267e@manitou-mail.org
Whole thread Raw
In response to Re: BUG #16034: `\set ECHO all` doesn't work for \e command  (Pavlo Golub <pavlo.golub@cybertec.at>)
Responses Re: BUG #16034: `\set ECHO all` doesn't work for \e command
List pgsql-bugs
    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



pgsql-bugs by date:

Previous
From: "张舒燕"
Date:
Subject: Write skew anmalies are found in SERIALIZABLE isolation
Next
From: Tom Lane
Date:
Subject: Re: BUG #16034: `\set ECHO all` doesn't work for \e command