Re: psql - factor out echo code

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: psql - factor out echo code
Дата
Msg-id 202107022107.zu3p2qevtxja@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: psql - factor out echo code  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: psql - factor out echo code
Список pgsql-hackers
On 2021-Jul-02, Tom Lane wrote:

> Fabien COELHO <coelho@cri.ensmp.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql - factor out echo code
Следующее
От: Ranier Vilela
Дата:
Сообщение: Re: Fix uninitialized variable access (src/backend/utils/mmgr/freepage.c)