Re: Better title output for psql \dt \di etc. commands

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Better title output for psql \dt \di etc. commands
Date: 2025-02-04 19:56:22
Message-ID: 674707.1738698982@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> On 2025-Feb-04, Tom Lane wrote:
>> =?utf-8?Q?=C3=81lvaro?= Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
>>> At this point I would just add a "translator:" comment that explains
>>> that the ??? bit is for unexpected cases and can be translated in the
>>> same way.

>> Hmm, do we have a standard policy or comment wording about that?
>> I looked for "translator: ... unexpected" and didn't find any
>> existing comments of that sort.

> I don't remember cases of messages of that kind marked for translation,
> so I'm not surprised that we don't have any such comments. Those would
> typically be elog() or the errfoo_internal() cases, I think.

Yeah, that's what I would have thought.

The implementation I had in mind was to just invent a
pg_log_error_internal() macro alias for pg_log_error().
That'd take about two lines counting the explanatory comment.
This approach would fail to suppress the cost of gettext's
trying to look up the string, but surely we aren't concerned
about that here --- we just want to not burden translators
with the string. (I need to check that gettext isn't smart
enough to see through a macro, though. If it is, a static
inline function should do.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2025-02-04 19:57:40 Re: Eagerly scan all-visible pages to amortize aggressive vacuum
Previous Message Shubham Khanna 2025-02-04 19:55:45 Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided.