Re: psql - factor out echo code

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, vignesh C <vignesh21(at)gmail(dot)com>, 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: 2022-11-30 07:45:49
Message-ID: Y4cKLWjuz0BUK7n9@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jul 24, 2022 at 10:23:39PM +0200, Pavel Stehule wrote:
> I had just one question - with this patch, the format of output of modes
> ECHO ALL and ECHO QUERIES will be different, and that can be a little bit
> messy. On second hand, the prefix --QUERY can be disturbing in echo queries
> mode. It is not a problem in echo all mode, because queries and results are
> mixed together. So in the end, I think the current design can work.
>
> All tests passed, this is trivial patch without impacts on users
>
> I'll mark this patch as ready for committer

Hmm. The refactoring is worth it as much as the differentiation
between QUERY and INTERNAL QUERY as the same pattern is repeated 5
times.

Now some of the output generated by test_extdepend gets a bit
confusing:
+-- QUERY:
+
+
+-- QUERY:

That's not entirely this patch's fault. Still that's not really
intuitive to see the output of a query that's just a blank spot..
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2022-11-30 08:07:53 Re: pg_dump: Remove "blob" terminology
Previous Message Masahiko Sawada 2022-11-30 07:30:15 Re: [PoC] Improve dead tuple storage for lazy vacuum