From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Shinya11(dot)Kato(at)nttdata(dot)com, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: psql - factor out echo code |
Date: | 2021-07-02 21:07:50 |
Message-ID: | 202107022107.zu3p2qevtxja@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2021-Jul-02, Tom Lane wrote:
> Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
> > Yes. Maybe decorations should be SQL comments, and the purpose/origin of
> > the query could be made clear as you suggest, eg something like markdown
> > in a comment:
> > "-- # <whatever> QUERY\n%s\n\n"
>
> If we keep the decoration, I'd agree with dropping all the asterisks.
> I'd vote for something pretty minimalistic, like
>
> -- INTERNAL QUERY:
I think the most interesting case for decoration is the "step by step"
mode, where you want the "title" that precedes each query be easily
visible. I think two uppercase words are not sufficient for that ...
and Markdown format which would force you to convert to HTML before you
can notice where it is, are not sufficient either. The line with a few
asterisks seems fine to me for that. Removing the asterisks in the
other case seems fine. I admit I don't use the step-by-step mode all
that much, though.
Also: one place that prints queries that wasn't mentioned before is
exec_command_print() in command.c.
--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/
"Ed is the standard text editor."
http://groups.google.com/group/alt.religion.emacs/msg/8d94ddab6a9b0ad3
From | Date | Subject | |
---|---|---|---|
Next Message | Ranier Vilela | 2021-07-02 21:22:56 | Re: Fix uninitialized variable access (src/backend/utils/mmgr/freepage.c) |
Previous Message | Tom Lane | 2021-07-02 20:56:54 | Re: psql - factor out echo code |