Re: psql - factor out echo code - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: psql - factor out echo code
Date
Msg-id alpine.DEB.2.22.394.2107140905320.1705285@pseudo
Whole thread Raw
In response to Re: psql - factor out echo code  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql - factor out echo code  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Transactions involving multiple postgres foreign servers, take 2
Next
From: Masahiko Sawada
Date:
Subject: Re: Skipping logical replication transactions on subscriber side