diff --git a/docs/config.html b/docs/config.html index 382b1ec2..fdaa984b 100644 --- a/docs/config.html +++ b/docs/config.html @@ -317,5 +317,59 @@
Please refer to a keyword list for details.
+A value that contains characters with a special meaning
+(;, =, spaces or braces) must be escaped.
+It is important to understand that a connection string is processed by
+two independent parsers, each with its own escaping rules.
The driver splits the keyword string on ; (the attribute
+delimiter) and on the first = of each attribute. To include one
+of these characters, or a space, in a value, use one of the following:
{ }. A braced
+value may contain ;, = and spaces. For example
+PWD={my;odd=pass word}. To include a literal closing brace
+} inside a braced value, double it as }}.
++ or %20, and an arbitrary
+byte as %XX (two hex digits). For example
+PWD=pass+word or PWD=pass%20word.
+A backslash (\) has no special meaning in the
+psqlODBC connection string itself; it is passed through literally.
The Libpq parameters option (see Advanced Options 3/3 above) is +passed on to libpq and parsed by it as a conninfo +string, which has its own, different rules. Within this value libpq +separates parameters by spaces, so to include a space (or other special +character) in a libpq parameter value you use libpq's escaping:
+ +\ escapes the following character, e.g.
+sslcert=C:\ my\ folder\ cert.
+' ', e.g.
+sslcert='C:\my folder\cert'. A literal single quote or backslash
+inside quotes is written as \' and \\.
+This is why, in the VBA example above, the libpq paths inside the
+D5={...} braces use backslashes: the braces are consumed by the
+psqlODBC parser (layer 1), and the contents are then handed to libpq
+(layer 2). The two layers can therefore both apply to the same value.