| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Miscellaneous message fixes |
| Date: | 2026-02-10 10:26:55 |
| Message-ID: | 202602101023.p75nm75pl7jh@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-Feb-10, Kyotaro Horiguchi wrote:
Hello,
> 0006:
> In extended_stats_funcs.c:
> > errmsg("could not find extended statistics object \"%s\".\"%s\"",
> > quote_identifier(nspname),
> > quote_identifier(stxname)));
>
> Since quote_identifier() already adds quoting when needed, adding
> "%s"."%s" in the format string results in double quoting. It would be
> better to use %s.%s instead. I think quoting should be applied only
> when necessary here. I'm not sure we should use
> quote_qualified_identifier() instead.. (It's not used in the attached
> patch).
>
> There's a similar inconsistency.
>
> > errmsg("could not clear extended statistics object \"%s\".\"%s\": incorrect relation \"%s\".\"%s\" specified",
> > get_namespace_name(nspoid), stxname,
> > relnspname, relname));
>
> In this part, the names are not passed through quote_identifier(). It
> would be better to unify this as well.
Hmm, in the vast majority of messages, the quotes are in the literal
string, and we do not add quote_identifier(). This way, the names are
always quoted, not just when they are funny identifiers; also the
translator chooses the quoting style they want, which is not necessarily
the same as the one used in English.
So my recommendation would be to remove the quote_identifier() calls and
leave the quotes in the message.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavel Stehule | 2026-02-10 10:34:31 | Re: jsonb subscripting vs SQL/JSON array accessor semantics (SQL:2023) |
| Previous Message | Jim Jones | 2026-02-10 10:09:33 | Re: Add CREATE SCHEMA ... LIKE support |