Re: Adding comments to help understand psql hidden queries
David Christensen <david+pg@pgguru.net>
From: David Christensen <david+pg@pgguru.net>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Greg Sabino Mullane <htamfids@gmail.com>,
Jim Jones <jim.jones@uni-muenster.de>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-04-04T16:12:18Z
Lists: pgsql-hackers
Attachments
- v5-0001-Improve-SQL-comments-on-echo-hidden-output.patch (application/octet-stream) patch v5-0001
On Thu, Apr 4, 2024 at 9:32 AM Peter Eisentraut <peter@eisentraut.org> wrote:
>
> On 03.04.24 19:16, David Christensen wrote:
> > I removed _() in the output of the query/stars since there'd be no
> > sensible existing translations for the constructed string, which
> > included the query string itself. If we need it for the "QUERY"
> > string, this could be added fairly easily, but the existing piece
> > would have been nonsensical and never used in practice.
>
> "QUERY" is currently translated. Your patch loses that.
I see; enclosed is v5 which fixes this.
The effective diff from the last one is:
- char *label = "QUERY";
+ char *label = _("QUERY");
and
- label = psprintf("QUERY (\\%s)", curcmd);
+ label = psprintf(_("QUERY (\\%s)"), curcmd);
Best,
David
Commits
-
Add labels to help make psql's hidden queries more understandable.
- 41d69e6dccad 19 (unreleased) landed