Re: Miscellaneous message fixes

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Miscellaneous message fixes
Дата
Msg-id aYurQ_SLbysSvD0n@paquier.xyz
обсуждение исходный текст
Ответ на Re: Miscellaneous message fixes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Miscellaneous message fixes
Список 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

Вложения

В списке pgsql-hackers по дате отправления: