From: Michael Paquier Date: Thu, 30 Nov 2023 05:19:29 +0000 (+0900) Subject: doc: Mention how to use quotes with GUC names in error messages X-Git-Tag: REL_17_BETA1~1366 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=a243569bf65c5664436e8f63d870b7ee9c014dcb;p=postgresql.git doc: Mention how to use quotes with GUC names in error messages Quotes should not be used except if a GUC name is a natural English word. Author: Álvaro Herrera Discussion: https://postgr.es/m/CAHut+Pv-kSN8SkxSdoHano_wPubqcg5789ejhCDZAcLFceBR-w@mail.gmail.com --- diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml index 06d995e4b76..5d1d510f8e7 100644 --- a/doc/src/sgml/sources.sgml +++ b/doc/src/sgml/sources.sgml @@ -538,6 +538,14 @@ Hint: The addendum, written as a complete sentence. variables that will not contain words (for example, operator names). + + In messages containing configuration variable names, do not include quotes + when the names are visibly not natural English words, such as when they + have underscores, are all-uppercase or have mixed case. Otherwise, quotes + must be added. Do include quotes in a message where an arbitrary variable + name is to be expanded. + + There are functions in the backend that will double-quote their own output as needed (for example, format_type_be()). Do not put