Re: psql - factor out echo code

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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: 2021-07-14 07:57:54
Message-ID: alpine.DEB.2.22.394.2107140905320.1705285@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> Attached v4 simplifies the format and fixes this one.
>
> I think this goes way way overboard in terms of invasiveness. There's no
> need to identify individual call sites of PSQLexec. [...]

ISTM that having the information was useful for the user who actually
asked for psql to show hidden queries, and pretty simple to get, although
somehow invasive.

> It also looks like a mess from the translatibility standpoint.
> You can't expect "%s QUERY" to be a useful thing for translators.

Sure. Maybe I should have used an enum have a explicit switch in
echoQuery, but I do not like writing this kind of code.

Attached a v5 without hinting at the origin of the query beyond internal
or not.

--
Fabien.

Attachment Content-Type Size
psql-echo-5.patch text/x-diff 9.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-07-14 08:14:32 Re: Skipping logical replication transactions on subscriber side
Previous Message Masahiko Sawada 2021-07-14 07:52:41 Re: Transactions involving multiple postgres foreign servers, take 2