| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Miscellaneous message fixes |
| Date: | 2026-02-10 22:03:47 |
| Message-ID: | aYurQ_SLbysSvD0n@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Feb 10, 2026 at 09:55:23AM -0500, Tom Lane wrote:
> Yeah, this code is simply wrong. You should remove the
> quote_identifier() calls and otherwise leave it as-is.
>
> quote_identifier(), quote_qualified_identifier(), etc are meant for
> building valid SQL strings. However, an error message is a totally
> different animal. We decided years ago that the preferred style is
> to wrap "..." around the unadorned identifier *in the error text*,
> not by using quote_identifier(), so that translators could replace
> the double-quote marks with appropriate marks for their language.
> Is the English version 100% consistent in the presence of identifiers
> containing double-quote marks? No. But we'd be making matters
> worse not better for other languages if we did it differently.
Right, I had a brain fart on this one. Using "%s"."%s" where the
namespace and object names were independently quoted is also not
project style. At the end, I have removed the quote_identifier()
calls altogether, and reduced the number of quotes in the error
strings, leading to f33c58577422 as a result. If there is anything
else, please let me know.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Euler Taveira | 2026-02-10 22:05:30 | Re: log_min_messages per backend type |
| Previous Message | Jelte Fennema-Nio | 2026-02-10 21:59:57 | Re: Add GoAway protocol message for graceful but fast server shutdown/switchover |