doc: Mention how to use quotes with GUC names in error messages
authorMichael Paquier <[email protected]>
Thu, 30 Nov 2023 05:19:29 +0000 (14:19 +0900)
committerMichael Paquier <[email protected]>
Thu, 30 Nov 2023 05:19:29 +0000 (14:19 +0900)
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

doc/src/sgml/sources.sgml

index 06d995e4b7616b692bdf9f70c03083b47d0760bf..5d1d510f8e74a397f9af5ea19fbb4ff30e845f04 100644 (file)
@@ -538,6 +538,14 @@ Hint:       The addendum, written as a complete sentence.
     variables that will not contain words (for example, operator names).
    </para>
 
+   <para>
+    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.
+   </para>
+
    <para>
     There are functions in the backend that will double-quote their own output
     as needed (for example, <function>format_type_be()</function>).  Do not put